Posts

Showing posts from April, 2014

converting xml to a datatable from a string c#? -

i trying xml string attachment using imapx later saves data byte[]. , after conversion, string has linebreaks represented \r\n. byte[] att = w.filedata; str = system.text.encoding.default.getstring(att); the string seems have "\r\n" breaks instead of whitespace , new lines str = str.replace("\r\n", " "); when try read xml using string reader read xml stringreader sr = new stringreader("your xml"); dataset ds = new dataset(); ds.readxml(sr); it doesn't seem program can understand code in such format. have tried apply linebreaks in xml instead of \r\n using &#xa ; instead without success. xml works fine , converts datatable if retrieved file on system want able create datatable string directly original xml: <?xml version="1.0" standalone="yes"?> <data> <id>931304</id> <age>26</age> </data> <data> <

typeerror - Minecraft won't run. Multiple items cannot be resolved to a type -

Image
i finished skating around infamous "cannot load main class start" thing, , got blindsided sea of errors: a friend suggests might have com.google, can't me. i haven't made single alteration of code far. eclipse started not being able run , stayed way. think there's way fix require making acute changes @ sight of every single error; work wiped cleanup if i'm proved wrong. anyone have clue issue is? thank trouble. update: adding guava library relieved error involving com.google, threw in handful of others. 1 class file contains 3 of common unresolved types i've seen scattered throughout: logger/logmanagaer, propertymap, , crashreport your general problems revolve around not having dependencies in build path. eclipse's error messages pretty clear this; e.g. if package name underlined in red , can't found, means can't found, , obvious solution add library provides it, can found. in virtually cases here, google search missi

c - _mm_crc32_u8 gives different result than reference code -

i've been struggling intrinsics. in particular don't same results using standard crc calculation , supposedly equivalent intel intrinsics. i'd move using _mm_crc32_u16 , , _mm_crc32_u32 if can't 8 bit operation work there's no point. static uint32 g_ui32crc32table[256] = { 0x00000000l, 0x77073096l, 0xee0e612cl, 0x990951bal, 0x076dc419l, 0x706af48fl, 0xe963a535l, 0x9e6495a3l, 0x0edb8832l, 0x79dcb8a4l, 0xe0d5e91el, 0x97d2d988l, .... // basic 32-bit crc calculator // note: code cannot changed uint32 calccrc32(unsigned char *pucbuff, int ilen) { uint32 crc = 0xffffffff; (int x = 0; x < ilen; x++) { crc = g_ui32crc32table[(crc ^ *pucbuff++) & 0xffl] ^ (crc >> 8); } return crc ^ 0xffffffff; } uint32 calccrc32_intrinsic(unsigned char *pucbuff, int ilen) { uint32 crc = 0xffffffff; (int x = 0; x < ilen; x++) { crc = _mm_crc32_u8(crc, *pucbuff++); } return crc ^ 0xf

Modified xfloat in latex causes runaway argument -

i required use customized document class modifies xfloat... \input{report.cls} % single space figures, tables, , footnotes % redefine macro used floats (including figures , tables) % single spacing used. (note \def\figure{\@float{figure}set % single spacing} doesn't work because figure has optional argument) \def\@xfloat#1[#2] { \ifhmode \@bsphack\@floatpenalty -\@mii \else \@floatpenalty-\@miii \fi \def\@captype{#1} \ifinner \@parmoderr\@floatpenalty\z@ \else\@next\@currbox\@freelist { \@tempcnta\csname ftype@#1\endcsname \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n \@tfor \@tempa :=#2\do { \if\@tempa h\advance\@tempcnta \@ne\fi \if\@tempa t\advance\@tempcnta \tw@\fi \if\@tempa b\advance\@tempcnta 4\relax\fi \if\@tempa p\advance\@tempcnta 8\relax\fi } \global\count\@currbox\@tempcnta } \@fltovf\fi \global\setbox\@currbox\vbox\bgroup \def\baselinestretch{1}\@normalsize \boxmaxdepth\z@ % lea

excel vba created active x button missing text until moved in design mode -

so had working in giant excel project until today. have large project of code i'm running on multitude of sheets within large group of workbooks. part of code makes buttons needed. edited unrelated range formats sheets , when ran code, 1 of 3 button creation processes created buttons appear have no caption. however, when enter design mode , move buttons, text appears (i trying @ properties when found out). of buttons have valid values caption, none of them being displayed until manually moved , moved back. considering there ~ 10,000 of these buttons between workbooks, problematic manual process. (luckily haven't run code on workbooks yet) i can't life of me figure out why these buttons having happen, consistent behavior. other active x buttons not having same problem. here code active x button works: sub addnamebutton(tc range, sht worksheet) dim newbutton oleobject dim buttonexist boolean dim buttonname string buttonexist = false buttonname =

html - Chrome ignores input maxlength even if type = text -

for html input, type="text", chrome seems ignore maxlength attribute when size large. i can populate input (maxlength=1000000, type=text) field database 188906 characters, 57834 display in chrome. if view source, can see characters. ie allows me see 188906 characters. i know weird use case, involves user pasting in stock tickers input field. https://jsfiddle.net/n69p2bqn/ <input code>too large post update : appears textarea can display data in chrome: https://jsfiddle.net/4o1ch120/ <textarea code>too large post i believe still chrome bug though.

Fabricjs: Adding and selecting objects on canvas -

this i'm trying achieve in jsfiddle : if user clicks on canvas, rect added if user clicks on rect added, can drag or resize it the problem when user clicks on rect select it, triggers click on canvas rect added. how prevent happen? html <canvas id="c" width="400" height="300"></canvas> javascript var canvas = new fabric.canvas('c'); canvas.on('mouse:down', function(options) { var rect = new fabric.rect({ left: options.e.clientx, top: options.e.clienty, width: 60, height: 60, fill: 'rgba(255,0,0,0.5)', }); canvas.add(rect); }); this how fixed it, options.target null if user clicked on canvas, not null if user clicked on object: canvas.on('mouse:down', function(options) { if (options.target) return; var rect = new fabric.rect({ left: options.e.clientx, top: options.e.clienty, width: 60,

how to get range of inactive sheets in excel in C# -

in microsoft.office.interop.excel.worksheet, want range of inactive sheet, there way create new object of inactive sheet? can range of active sheet using excel.application.activesheet. thanks here's simple approach : var wb = excel.application.activeworkbook; list<worksheet> sheets = new list<worksheet(); foreach(var sheet in wb.sheets) { if(sheet != excel.application.activesheet) { sheets.add(sheet); } }

dictionary - Hash with key as an array type -

how create key array in go map. example in ruby can implement such: quarters = { [1, 2, 3] => 'first quarter', [4, 5, 6] => 'second quarter', [7, 8 ,9] => 'third quarter', [10, 11, 12] => 'fourh quarter', } quarters[[1, 2, 3]] # => "first quarter" how same looked in golang ? array types (unlike slices) in go comparable, there nothing magical in it: can define other maps: map[keytype]valuetype keytype [3]int , valuetype string . the comparison operators == , != must defined operands of key type; key type must not function, map, or slice. m := map[[3]int]string{} m[[3]int{1, 2, 3}] = "first quarter" m[[3]int{4, 5, 6}] = "second quarter" m[[3]int{7, 8, 9}] = "third quarter" m[[3]int{10, 11, 12}] = "fourth quarter" fmt.println(m) output: map[[1 2 3]:first quarter [4 5 6]:second quarter [7 8 9]:third quarter [10 11 12]:fourth quarter] try on go

Excel 2010 VBA - Use Value of variable as another variable -

this practice follow while writing vba code. set worksheet names without spaces variable names. example have workbook 3 worksheets following names 1 - control 2 - 60 w status 3 - 60 w status pvt tbl i set worksheets names worksheet variables in following way: set wb = thisworkbook set wscontrol = wb.sheets("control") set ws60wstatus = wb.sheets("60 w status") set ws60wstatuspvttbl = wb.sheets("60 w status pvt tbl") now want make dynamic meaning code should loop through worksheets in workbook , store worksheet names without spaces variable names ws* so have following code far: sub getwsnames() set wb = thisworkbook dim wsnames() = 0 'loop through workbook , store names wsname in array each ws in worksheets redim preserve wsnames(i) var1 = ws.name var2 = replace(ws.name," ", "") var3 = "ws" & var2 wsnames(i) = var3 = + 1 next 'loop through array wsname

Android dosen't show me keybord. I use Adapter with Edittext indise AlertDialog -

alertdialog works fine, shows me adpater, when click on edittext inside adapter, keybord dosen't open. besides that: log.d(log_tag, "item:"+item) inside onclicklistener dosen't work. public class addproduct extends activity implements onclicklistener { string log_tag; button fillfields; arraylist<string> somearray; boxadapter boxadapter; @suppresswarnings("deprecation") public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.newproduct); fillfields=(button)findviewbyid(r.id.fillfields); fillfields.setonclicklistener(this); somearray=new arraylist<string>(); boxadapter = new boxadapter(this, somearray); } @override public void onclick(view v) { // todo auto-generated method stub switch (v.getid()){ case r.id.fillfields: alertdialog.builder alert = new alertdialog.builder(this); alert.settitle("Поля

osx - Python sys.stdout.write() strange behavior in Mac terminal -

i trying make progress bar process, keep things short consider following snippet: import sys import time in range(10): time.sleep(0.5) sys.stdout.write('*') sys.stdout.write('\n') what expecting print star every half second on same line (which when run code ide sublime text example). however, when run in mac os terminal waits 5 seconds prints whole string ********** @ once. any ideas why might happening , how desired behavior? it because output buffered. try instead: import sys import time in range(10): time.sleep(0.5) sys.stdout.write('*') sys.stdout.flush() # <-- key sys.stdout.write('\n') by flushing output each time write, sys.stdout won't wait next newline; instead write whatever characters in buffers immediately.

mysql - Split one column in many columns [Wordpress] -

good evening, i want me split of column in many columns, tried many cases not succeed... i have table in entries made in column name -> value: photo image sample 1 and want convert , catch through query (select): photo image sample 2 i grateful if there solution... thanks! try query. (assuming [test] table name) select t.lead_id , t.form_id -- sub-query value1 , (select value test inner_t inner_t.lead_id = t.lead_id , inner_t.form_id = t.form_id , inner_t.field_number = 1) value1 -- sub-query value2 , (select value test inner_t inner_t.lead_id = t.lead_id , inner_t.form_id = t.form_id , inner_t.field_number = 2) value2 -- sub-query value3 , (select value test inner_t inner_t.lead_id = t.lead_id , inner_t.form_id = t.form_id , inner_t.field_number = 3) value3 -- sub-query value4 , (select value test inner_t inner_t.lead_id = t.

vb.net - Text Wrapping when Printing -

Image
i'm trying make sure words , characters on printdocument go way page margins , wrap. @ moment wraps quite gap: the red margin. want text go way margin, if exceeds, wrap it. this printdocument code: private sub printdoc_printpage(sender object, e printpageeventargs) handles printdoc.printpage dim printfont new font(thetextbox.fontfamily.tostring(), convert.tosingle(thetextbox.fontsize)) dim charactersonpage integer = thetextbox.text.length dim linesperpage integer = thetextbox.linecount e.graphics.drawrectangle(pens.red, e.marginbounds) e.graphics.measurestring(stringtoprint, printfont, e.marginbounds.size, stringformat.genericdefault, charactersonpage, linesperpage) e.graphics.drawstring(stringtoprint, printfont, brushes.black, e.marginbounds, stringformat.genericdefault) stringtoprint = stringtoprint.substring(charactersonpage) e.hasmorepages = stringtoprint.length > 0 end sub

angularjs - How to bootstrap an Express / Angular app with a user object? -

during initial request, how can load user object (or object) on express back-end , populate angular app loaded? have application sending jwt token to. have sucessfully validated session , loaded initial data (user object, etc.) application needs. cannot figure out how load angular app. embed in page @ server side, perhaps using templating engine. see mean.js framework, something similar that. https://github.com/meanjs/mean/blob/master/app/views/layout.server.view.html

angularjs service can't access property -

i have class set this: .factory('designerservice', function () { var kit = { clubname: 'moss side archery club', teamname: 'the flying arrows', selectedcolours: ['082140', '841c3d'], selectedgarments: ['hoody'], selecteddesign: "angelus", total: '00.00', templates: [] }; var gettemplates = function () { var templates = []; console.log(kit); (var = 0; < kit.selectedgarments.length; i++) { var garment = kit.selectedgarments[i]; kit.templates.push('/assets/garments/' + garment + '.svg'); } return kit; }; var getcolours = function () { return ['000000', 'ffffff', '00adef', 'ed008c', 'fef200', '2e3192', '00a652', 'ed1b24', 'c7c8ca', 'f14e23', '6c9d30', 'c0d7

vba - Contradiction between typeface scale and page scale -

according xerox, font "courier 10 point font print @ 12 characters per inch." given default page 5.5 width, 65 characters per row. one can verify 12 pt courier, , many other 12 pt founts, fit 46 or 47 rows per default page 9 inch height. consider character width column. monospaced 12 pt fonts, common have 60 characters per line. given 46 rows, ratio of columns rows, or height width in character spacing, 18:11. yet ratio, or it, suggested total space monospace or glyph uses. because of "72 pts per inch" clause. if there 72 pts per inch, there 648 pts in 9 inches, or 14 pts each of 46 rows. similarly, there 396 pts in 5.5 width document page. if 60 12 pt characters fit, each ... 6.6 pts wide! further, ratio of 14 6.6 2.12. yikes! variability between different fonts, etc., account difference. 6.6 12 beyond that. can explained? there 2 things understand font point sizes. first, specifies height of font, not width. should obvious when cons

python - Image processing: Trying to make a photo negative? -

i understand make image negative, have change rgb values current value being subtracted 255. what wrong following code? def negative(im): height=len(im) width = len(im[0]) row in range(height): col in range(width): red = im[row][col][0] - 255 green = im[row][col][1] - 255 blue = im[row][col][2] - 255 im[row][col]=[red,green,blue] return im it returns error "tclerror: can't parse color "#-1d-c-2"" your problem getting negative numbers. think should doing 255 - x rather x - 255

c# - How do I force user to input after certain time? -

i force whatever user has typed entered after time. i've been using this, has problems. string input = console.readline(); while (repeat == true) { if (time has passed) { sendkeys.send("{enter}"); repeat = false; } else repeat = true; } the problem stays @ readline until user presses enter. don't want use readkey, because able contain more 1 character. i'd use task , wait 5 seconds. static void main(string[] args) { list<consolekeyinfo> userinput = new list<consolekeyinfo>(); var userinputtask = task.run(() => { while (true) userinput.add(console.readkey(true)); }); userinputtask.wait(5000); string userinputstr = new string(userinput.select(p => p.keychar).toarray()); console.writeline("time's up: pressed '{0}'", userinputstr); console.readline(); }

queue - How to make a shallow copy of a list Java -

i've made class revolved around implementing queues using linked list. implementation works fine. however, have write constructor passed queue, , has make duplicate of original queue. duplicate, mean elements in each queue same, actual nodes not. how go doing this? p.s. may not use collections class means no clone() method. from described algorithm achieve be: write constructor accepts queue example access head of underlying linked list traverse list, using elements populate queue, creating new nodes hold same values

Python loop through list starting at index -

i looking more pythonic way loop though list starting an index return values contained in sub-lists eg: values = [[1,2], [2], [1,3,4]] n=1 i, item in enumerate(values[n:]): += n if < len(values): sub_value in values[i]: print("index: "+str(i)+ " list: "+str(item)+ " sub value: "+str(sub_value)) the code works intended pretty ugly, ideas simplify it? i'm not sure understand trying achieve.if want print flat list of items index 1 this: [item sublist in values[1:] item in sublist] which produces: [2, 1, 3, 4]

c++ - Polymorphism is not working with function return values of same data type (Base and Inherited class) -

as far know override virtual function in inherited class function should have same data type of return value base class function. but compiler accept changing return value if return pointer or value belong class inherited class of return value of original function following: #include <iostream> class base{ public: virtual base * clone() { std::cout << "base::clone()\n" ; base * bp = new base ; return bp ; } std::string id() {return "base class";} }; class derived: public base { public: //derived* , base* same data type (acceptable): derived * clone() { std::cout << "derived::clone()\n" ; derived * dp = new derived ; return dp ; } std::string id() {return "derived class";} }; int main() { base * bp = new derived; std::cout << bp->clone()->id() <<"\n"; std::cout << dynamic_cast <derived*>(bp->clone())->id() <<"\n";

mvvm - Get data from a user control in wpf to an user control? -

basically i'm new wpf. have user control - a. inside a, have user control b. when button on b pressed, value passed a. i`m trying wpf mvvm. kindly me. //-------------------mainwindow------------------// public partial class mainwindow : window { public delegate void valuepassdelegate(int valuetoget); public event valuepassdelegate valuepassevent; public usercontrol1 usercontrol1obj = new usercontrol1(); public usercontrol2 usercontrol2obj = new usercontrol2(); public mainwindow() { initializecomponent(); valuepassevent += new valuepassdelegate(method1); usercontrol1obj.del = valuepassevent; } public void method1(int valuetoget) { usercontrol2obj.txtname.text = valuetoget.tostring(); } } //---------------------usercontrol1------------------// public partial class usercontrol1 : usercontrol { public delegate del; public int valuetopass = 0; public usercontrol1() { initializeco

c++ - Writing HugeInteger class -

i new c++ , suppose assignment. create class hugeinteger uses 40-element array of digits store integers large 40 digits each. provide member functions input, output, add , subtract. comparing hugeinteger objects, provide functions isequalto, isnotequalto, isgreaterthan, islessthan, iscreaterthanorequalto , islessthanorequalto - each of these "predicate" function returns true if relationship holds between 2 hugeintegers , returns false if relationship not hold. also, provided predicate function iszero. recommendations points: provide member functions multiply, divide, , modulus. i having trouble figuring out how compare 2 objects in class. my header coding looks this: #pragma once #include <iostream> using namespace std; static const int maxinteger = 40; //hugeinteger class class hugeinteger { public: hugeinteger(void); //constructor ~hugeinteger(void); //destructor void hugeinteger::input(int[maxinteger]); //input array internal array

Need to show image from image path stored in mysql to Crystal Report Viewer in C#(VS 2008) -

i need show image dynamically in crystal report mysql image path in c# (visual studio 2008). have stored image path in mysql db, couldnt able display image on cr. code have tested not working. lots of goggling done in this, cant find solutions still. please help..!! datatable dt = new datatable(); string student = "select `photo_path` `tc` `register_no`= '" + reg_no + "';"; // mysqlconnection con = new mysqlconnection(conn); //con.open(); mysqlcommand cmd1 = new mysqlcommand(student, conn); mysqldatareader detail1 = cmd1.executereader(); reportdocument rptdoc = new reportdocument(); mysqldataadapter da = new mysqldataadapter(); // .xsd file name da.selectcommand = cmd1; da.fill(dt); while (detail1.read()) { string image = detail1.getstring(0); } detail1.close(); conn.close

.htaccess - Wordpress url redirect better approach -

. . . . how doing i have wordpress blog 29 posts. url structure was http://www.domain.com/category/cat_name/post_name/ which have changed http://www.domain.com/post_name/ using permalink settings. wanted older links work did redirects using htaccess redirect 301 /categories/cat_name/post_name/ /post_name/ i have checked links , working. now need know approach or better approach it. doing redirects 29 links? try de function get_page_by_path($args) of core of wordpress. see docs in http://codex.wordpress.org/function_reference/get_page_by_path get lucky.

c++ - Prevent destruction of self after main? -

i'm writing asynchronous i/o stuff in c++, , need prevent object being destructed until handler asynchronous i/o called. i'm trying use shared_ptr , create object static constructor can sure using reference counting. save in weak_ptr until start asynchronous i/o, when store shared_ptr sure doesn't become invalid during time. finally, reset when callback completes. here's example: #pragma once #include <memory> #include <functional> using namespace std; class someio { std::weak_ptr<someio> self; std::shared_ptr<someio> savingself; void mycallback() { // callback stuff here savingself.reset(); } public: someio() = delete; ~someio() {} static shared_ptr<someio> create() { auto self = make_shared<someio>(); self->self = self; return self; } void start() { savingself = self.lock(); //startsomeasyncio(bind(self, someio::mycallback))

video - ffmpeg segmentation with multiple mp4 files to HLS stream -

i'm trying segment multiple mp4 files .txt concatenate works, doesn't seem work. i have concat.txt desired format: file video1.mp4 file video2.mp4 file video3.mp4 etc... and ffmpeg commands are: ffmpeg -i concat.txt -map 0 -codec:v libx264 -codec:a libfaac -f ssegment \ -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 out%03d.ts unfortunately every mediaplayer drops error on playback. i presume can't use method done concatenating. have concat mp4s single mp4, , segment mp4 final m3u8? or, can segment mp4s 1 one , concat .ts files better quality? the ffmpeg concat demuxer requires same codecs input files, although container can vary. need make sure video , audio streams have same ids across files. ffmpeg -re -f concat -i concat.txt -c:v libx264 -vbsf h264_mp4toannexb -r 25 -g 75 -c:a libfdk_aac -hls_time 3 playlist.m3u8 i used h264_mp4toannexb bitstream filter convert h.264 stream annex b format required mpeg-ts, set g

codeigniter - How to get CI pagination to work with a array(); -

how can codeigniter pagination work $data['controller_files'][] = array() i cannot figure out best place put uri->segment(4) , per page limit. the pagination links work not per page. still shows full list of files on table. routes // extensions $route['admin/extension/permissions'] = "admin/extension/extension_permissions/index"; $route['admin/extension/permissions/(:any)'] = "admin/extension/extension_permissions/index/$1"; controller <?php class extension_permissions extends admin_controller { public function index($offset = 0) { $data['title'] = "permissions"; $controller_files = $this->model_extension_permissions->get_installed_permissions('name'); $data['controller_files'] = array(); $files = glob(fcpath . 'application/modules/admin/controllers/*/*.php') ; if ($files) { foreach ($files $file) { $controller = basename

Python enumerate list setting start index but without increasing end count -

i want loop through list counter starting @ 0 list starting index @ 1 eg: valuelist = [1, 2, 3, 4] secondlist = ['a', 'b', 'c', 'd'] i, item in enumerate(valuelist, start=1): print(secondlist[i]) the code fails index out of range error (i realize because ends @ length of list -1 plus start value , python lists 0 indexed using in way call ith element in list not valid). following works addition of test greater 0 looks un-pythonic. valuelist = [1, 2, 3, 4] secondlist = ['a', 'b', 'c', 'd'] i, item in enumerate(valuelist, start=0): if > 0: print(secondlist[i]) enumerate not right choice, there way? it sounds if want slice list instead; still start enumerate() @ 1 same indices: for i, item in enumerate(valuelist[1:], start=1): this loops on valuelist starting @ second element, matching indices: >>> valuelist = [1, 2, 3, 4] >>> secondlist = ['a', &

java - how to solve Spring Security can access url without login -

hi have created sample spring mvc security application.i'm following java code based configuration rather xml configuration.the application working fine. , user can access each , every url without login application. how can resolve problems?? i want , users must not access url without login process. @enablewebsecurity @configuration public class websecurityconfig extends websecurityconfigureradapter { @autowired private customuserdetailsservice customuserdetailsservice; @override protected void configure(httpsecurity http) throws exception { http.csrf().disable() .headers() .addheaderwriter(new xframeoptionsheaderwriter(xframeoptionsheaderwriter.xframeoptionsmode.sameorigin)).and() .formlogin().defaultsuccessurl("/admin/home") .loginpage("/login").failureurl("/login?error") .permitall().and().logout() .logoutsuccessurl("

php - Vanity URL not working -

i using htaccess try , rewrite url. have tried 10 versions of code , examples nothing makes change. know mod_rewrite working because adding www url, vanity url won't work. rewriterule ^franchise/([0-9]+)/?$ franchise-information.php?franchiseid=$1 [nc,l] # handle product requests here .htaccess file: <ifmodule mod_rewrite.c> rewriteengine on rewritecond %{https} !=on rewritecond %{http_host} !^www\..+$ [nc] rewriterule ^ http://www.%{http_host}%{request_uri} [r=301,l] rewriterule ^franchise/([0-9]*?)/$ franchise-information.php?franchiseid=$1 [nc,l] </ifmodule> and here url: http://www.playballkids.com/franchise-information.php?franchiseid=162 you can use code in document_root/.htaccess file: options -multiviews rewriteengine on rewritebase / rewritecond %{the_request} /franchise-information\.php\?franchiseid=([^\s&]+) [nc] rewriterule ^ franchise/%1? [r=302,l,ne] rewriterule ^franchise/(\d+)/?$ franchise-information.php

ruby 2.2 , how to display the current content of the file? -

in ruby 2.2. script, writing xml file @filehandle << '<plist version="1.0">' ... @filehandle << "\n<#{element_name}>" .. during debugging , display current content, how can it's not yet closed, cached ... ? suggestions byebug @filehandle.class file @filehandle #<file:./albumdata-new.xml> you can execute these calls in order display content (i assume file opened reading , writing, i.e., mode r+ , w+ or a+ ) @filehandle.flush # make sure written disk @filehandle.seek(0) # can read beginning @filehandle.read # read

How invite facebook friends and get their id from ios app? -

i develop ios app chats (it's not game). have task invite fb friends(not using app) defined chat in app. need friend list, choose friens, send them notification(post on wall or message) , save fb friiend's id server. should use implemetation things? facebook ios sdk has features need. can see friend list of user logged in using facebook session, etc more info @ https://developers.facebook.com/docs/ios/sample-apps

vba - Access: cannot move to next record with the code -

private sub btn_next_click() 'creating connection database dim strsql string dim rs dao.recordset strsql = "select * tbl_author" set rs = currentdb.openrecordset(strsql) if not rs.bof , not rs.eof while (not rs.eof) me.txtid = rs.fields("author_id") me.txtfname = rs.fields("afirst_name") me.txtlname = rs.fields("alast_name") me.txtaddress = rs.fields("address") me.txteaddress = rs.fields("email_address") me.txtmnum = rs.fields("mobile_number") me.txtpnum = rs.fields("phone_number") me.cmbstatus = rs.fields("status") rs.movenext wend end if rs.close end sub found answer. wrote query based on current record displayed in form, no need of loop, every time click on next, gets next value database , post in textboxes.

jquery - How to select multiple date ranges from Fullcalendar? -

i trying make calendar feature in user can block off multiple date ranges selecting start , end dates. thinking of using fullcalendar not sure how proceed this. i did see examples of how block dates being selected adding check on dayclick these not deal date ranges. appreciate help, not looking entire source suggestions on how go this. this multi-part problem. here's basic idea. allow user make click+drag selection selectable: true in select callback, add background event addeventsource . when adding event, give custom property: block: true . use custom function selectoverlap returns false if event.block. something jsfiddle . selectable: true, select: function (start, end, jsevent, view) { $("#calendar").fullcalendar('addeventsource', [{ start: start, end: end, rendering: 'background', block: true, }, ]); $("#calendar").fullcalendar("unselect"); }, selectoverlap

Porting RIP ON SDN as an application -

i have been insisted "port rip on sdn" final year project. doubt when controller has intelligence of routing , whys rip on sdn. there other advantage of using rip application in sdn ? valid project proceed ? i think in sdn can use link-state routing protocol because in sdn have information of nodes in network, can use such distributed algorithm between sdn controllers. frameworks hyperflow (for more information see hyperflow: distributed control pane openflow paper) use idea distributed control pane.

python - Trouble with http request from Google Compute Engine -

i'm trying set google compute engine server pull options data using python pandas . when make request mac @ home, have problems late @ night when yahoo! resetting servers (the data being pulled yahoo! finance). when try doing same thing compute engine server, request fails of stocks i'm interested in, although typically works options on larger companies, such 'aapl' or 'ge'. on computer @ home, running @ same time, same requests succeed both small , large companies. the requests typically take few seconds, maybe many 15. there way more extensive logs going on when make these requests on google servers? things can think of there permissions issues reason these specific http requests or there timeout configured that's interfering. far can tell, general timeout should 75 seconds kind of request, , there's no way it's taking long. here's sample of see python shell: >>> pandas.io.data import options >>> spwr = options('