Posts

Showing posts from May, 2015

android - PhoneGap: Deleted my APP, created again now AppStore does not accept it -

android appstore says version code newer , not accept app, clue how assign version code manually? i edited config.xlm , on "widget" section, assign version: versioncode= "420" but android keeps saying app version newer last. seems phonegap created code somewhere-invisible , android reads there.... too inexperienced kids developing serious stuff.... oops....after compiling 3 times in phonegap, got version code , android appstore accepted it...

ruby on rails - Can 20,000 schemas exist in a single Postgres database? -

can single postgres database contain more 20,000 schemas? implications of such database design. i reading postgres schemas here - http://www.postgresql.org/docs/8.2/static/ddl-schemas.html , i'm planning create 1 schema per account in multi-tenant ruby on rails app. each schema have set of tables store data of relevant account. each user/schema features offer, have 50-60 tables. can postgres handle of without hiccups, provided allocate large ec2 instance host database server ? [update] by experience if 1 faced trouble such number of schemas in postgres, share , thought can more guidance avoid such pitfalls. you can create 20,000 schemas in single postgresql database, that's not it's idea. firstly, design point of view if want add new column table, that's 20,000 tables update. - if want view totals users, that's 20,000 table union you're going have write - not pretty. secondly, there have historically been issues large numbers of sch

Default Richfaces Jquery not loaded in the page -

i'm facing weird issue. i'm building web application using jsf 1.2 , richfaces 3.3.3. haven't loaded external jquery versions, rather stuck default 1 provided rich faces , ie jquery version 1.3.2. access default jquery using 'jquery' keyword. i have included few javascript files on top of page contains jquery in it. when remove richfaces components page, looks jquery isnt loaded. on console, see message 'jquery undefined'. when include 'rich:extendeddatatable' tag in page, error vanishes. wierd thing that, error still persists if include 'rich:datatable'. looks jquery loaded in page when use 'rich:extendeddatatable'. put 'rich:extendeddatatable' on page mo reason , render 'false'. i'm not sure how makes sense. the jsf includes on top of page <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns=&q

Display Toast from within static method in Android -

i wish display toast screen when condition met within static method shown below: public static void setauth(string a) { string[] nameparts1; if (a.trim().isempty()) { author = "author's name"; firstinit1 = "initial"; surname1 = "surname"; } if (a == 'x') { toast ifx = toast.maketext(getapplicationcontext(), "please enter name in correct format.", toast.length_short); ifx.show(); } } however gives me error: 'cannot make static reference non-static method getapplicationcontext() type contextwrapper'. hopefully have provided enough information here. appreciated! pass context in parameter (in call, use getapplicationcontext() input) , in static function, use context: public static void setauth(string a, context context) { ... toast ifx = toast.maketext(context, "please enter name in correct format.", toast.length_short); ... } and in fu

android - Nested Library Projects. Accesing to jars -

i have 2 library project , 1 main project. current structure: main project -> (depends on) 1 library project -> 2 library project. 2 library project contains .jar, want access main project. noclassdeffound exception, when running application on device. note: 1. 2 library project exportes .jar , private libraries 2. 1 library project exportes 2 library projects , private libraries. 3. using build tools v17. thanks. are trying launch activities , use classes in main project in 2 library project? if causing issue. you thinking library projects in wrong way. if have main project yours needs include every project depends on. example have main project needs 2 libraries b , c, both libraries rely on library a. it not this main -> lib a lib b -> lib a lib c -> lib a rather should this: main -> lib -> lib b -> lib c lib b -> lib a lib c -> lib a thus should able solve problems including 2 library pr

python - Connecting to locally postgresql using sqlalchemy -

definitely beginner here. i'm having issues connecting postgresql database run locally on macosx machine using postgres.app , sqlalchmey: import psycopg2 import sqlalchemy engine = sqlalchemy.create_engine('postgresql://localhost/practice.db') engine.connect() returns: operationalerror: (operationalerror) fatal: database "practice.db" not exist none none thanks, evan you have create database before can create_engine from urlparse import urlparse, urlunparse def recreate_db(url): parsed = urlparse(url) #parse url know host host_url = urlunparse((parsed.scheme, parsed.netloc, '/', '', '', '')) #create_engine without database name engine = create_engine(host_url, convert_unicode=true) dbname = parsed.path.strip('/') engine.execute('commit') try: #drop (and clean) database if exists raw query engine.execute('drop database `%s`;'%dbname)

JSF how to restrict validation to open accordion tab -

each of tabs has data table, input , add button. when click add button validation happens on open , closed tabs. see errors closed tabs in open tab. there way make validation occur in open tab. <p:accordionpanel id="pnl_accord_codetables" dynamic="true" cache="false"> <p:ajax event="tabchange" listener="#{pc_maintenence.ontabchange}" immediate="true"/> <c:foreach items="#{pc_maintenence.codemaintenencetables}" var="codetable"> <p:tab title="#{codetable.tablename}"> <util:datatable_util datatabletemplate="#{codetable}" datatablelist="#{pc_maintenence.getdatatablelist(codetable.tablelist_managedbeanname.concat('.').concat(codetable.tablelist_propertyname))}" datatablelistitem="#{pc_maintenence.getdatatablelistitem(codetable.tablelist_rowitemc

pdf - Printing data of datatable with itextsharp and c# -

because through code see first record in print checked in debug mode variables assigned regularly .. not go out .. arrg ... response this function retrieve data //recupero dati cliente datatable getcliitems() { try { con.connectionstring = "server=localhost;user id=root;password=cassano;database=cedas"; //con.open(); //query per la visualizzazione di tutti clienti string query = "select nome, cognome, indirizzo, telefono, cellulare, referente, note clienti rif_agente ='" + combobox1.text + "'"; //adapter per eseguire la query adapter = new mysqldataadapter(query, con); dataset ds = new dataset(); //restituisce il risultato della query nel dataset adapter.fill(ds); return ds.tables[0]; } catch (exception ex) { messagebox.show("errore durante il recupero delle informazioni.\n\n" + ex.message, "errore", messageboxbuttons.ok, messa

javascript - JS replacing all occurrences of string using variable -

this question has answer here: how use variable in regular expression? 16 answers i know str.replace(/x/g, "y") replaces x's in string want this function name(str,replacewhat,replaceto){ str.replace(/replacewhat/g,replaceto); } how can use variable in first argument? the regexp constructor takes string , creates regular expression out of it. function name(str,replacewhat,replaceto){ var re = new regexp(replacewhat, 'g'); str.replace(re,replaceto); } if replacewhat might contain characters special in regular expressions, can do: function name(str,replacewhat,replaceto){ replacewhat = replacewhat.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); var re = new regexp(replacewhat, 'g'); str.replace(re,replaceto); } see is there regexp.escape function in javascript?

ios - in app purchases - device crash -

if run app in simulator says failedtransaction... and if run on iphone crashes error: * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* -[__nssetm addobject:]: object cannot nil' here: code: - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath: (nsindexpath *)indexpath { uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:@"cell" forindexpath:indexpath]; skproduct * product = (skproduct *) _products[indexpath.row]; cell.textlabel.text = product.localizedtitle; [_priceformatter setlocale:product.pricelocale]; cell.detailtextlabel.text = [_priceformatter stringfromnumber:product.price]; if([[scoreboardiaphelper sharedinstance] productpurchased:product.productidentifier]) { cell.accessorytype = uitableviewcellaccessorycheckmark; cell.accessoryview = nil; } else { uibutton *buybutton = [uibutton buttonwithtype:uibuttontyperoundedrect]; buybutton.frame = c

how to reverse AJAX on HTML contenteditable DIV going to mySQL DB with PHP -

below find link contenteditable div page, appropriately titled ce.php: http://stateofdebate.com/ce.php my desire question find answer how can use comet/reverse ajax update text on page users when text changed. currently, saved mysql database, , text updated when other users refresh page. please not give vague answers "use websocket" or "use node.js". have asked question similar , gotten kind of answers. vote or check me, need either complete answers or links tutorials. i feel this, although specific question specific code, lot of people similar questions, if answered throughly , correctly. here complete code: ce.php <!doctype html> <head> <meta charset="utf-8"> <title>gazpo.com - html5 inline text editing , saving </title> <link href='http://fonts.googleapis.com/css?family=droid+serif' rel='stylesheet' type='text/css'> <style> body { font-family: helvetica,ar

iOS UILabel in scrollview appears as block -

i novice objective-c , developing first app, notification-center widget, compiled "theos" .deb its pretty straightforward: want create uiscrollview, scroll (horizontally) through multiple pages, added uiimage subviews scrollview. on 1 page add uibuttons uiimageview - works! i tried, testing, uislider on - works! all elements shown intended , can controlled, when add labels, no matter page, shows me white filled rect on left edge of uiimageview: buttons vs. buggy label the code simple as: creating scrollview in -(void)init scrollview = [[uiscrollview alloc] initwithframe:cgrectmake(0, 0, view_width, view_height)]; scrollview.pagingenabled = yes; scrollview.userinteractionenabled = yes; scrollview.autoresizingmask = uiviewautoresizingflexiblewidth; scrollview.showshorizontalscrollindicator = no; creating page subview in -(void)loadfullview page0 = [[uiimageview alloc] initwithimage:stretchablebgimg]; page0.frame = cgrectmake(pageview_offset, 0.0f, view_wid

jsp - how to use javascript variable inside scriptlet tag -

i want pass javascript variable scriptlet tag. below code, using scriptlet tags inside jsp page: <script> function concur(look){ alert(look); <% string lk=request.getparameter("look"); con.writing("heywow ",lk);%> </script> i want pass value of string 'look' argument function 'writing'. can tell me how ? thanks this question , answers may you. asked me earlier today :) javascript variable in asp block code good luck!

shell - How to separate multiple commands passed to eval in bash -

i'm trying evaluate multiple lines of shell commands using eval , when try resolve variables eval separated newline \n variables not resolved. x='echo a' y='echo b' z="$x\n$y" eval $x eval $y eval $z which outputs: a b anecho b the last command gives anecho b , , apparently \n treated n there. there way evaluate multiple lines of commands (say, separated \n )? \n not newline; it's escape sequence in situations translated newline, haven't used in 1 of situations. variable $z doesn't wind containing newline, backslash followed "n". result, what's being executed: $ echo a\necho b anecho b you can either use semicolon instead (which requires no translation), or use \n in context will translated newline: $ newline=$'\n' $ x='echo a' $ y='echo b' $ z="$x$newline$y" $ eval "$z" b note double-quotes around "$z" -- they're critical here. without

buglife spoj Time limit exceeded java -

any hint avoid getting time limit exceeded problem :_ http://www.spoj.com/problems/buglife/ how optimize code is there faster method reading input these methods reading input :_ http://ideone.com/gtsiac my solution :_ import java.io.*; import java.util.*; public class buglife { static int first; static arraylist[] graph = new arraylist[2000]; static int[] colour = new int[2000]; static int[] queue = new int[2000]; static int start; static int index; static int current; public static boolean bfs(int f) { (int p = 0; p < first; p++) { if (colour[p] != f && colour[p] != f + 1) { int x; start = 0; index = 0; queue[index++] = p; colour[p] = f; while (start < index) { current = queue[start++]; (int = 0; < graph[current].size(); i++) { x = (integer) graph[current].get(i);

javascript - how to save the scroll state -

i save/determine scroll state(current position) when user comes previous site can continue work position left it. can continuously save scroll position global variable , read when user comes back? using javascript, can find out scroll height set cookie. not great way it, it's possible. finding scroll height: $(document).ready(function(){ $(window).scroll(function(){ var scrolled = $(this).scrolltop(); console.log(scrolled); }); }); i suggest using jquery cookie plugin set cookie or session: http://archive.plugins.jquery.com/project/cookie http://www.sitepoint.com/eat-those-cookies-with-jquery/ then add variable cookie: $(document).ready(function(){ $(window).scroll(function(){ $.removecookie("mysitescrolled"); var scrolled = $(this).scrolltop(); $.cookie("mysitescrolled", scrolled); console.log(scrolled); }); }); then add "check scrolled" statement $(docume

networking - Detecting limited network connectivity in Android? -

there number of questions regarding how detect network connectivity in android. https://stackoverflow.com/a/4239019/90236 provides detailed answer , https://stackoverflow.com/a/8548926/90236 shows methods identify type of network 1 connected. we detect network connectivity using code similar answers like: private boolean isnetworkavailable() { connectivitymanager connectivitymanager = (connectivitymanager) getsystemservice(context.connectivity_service); networkinfo activenetworkinfo = connectivitymanager.getactivenetworkinfo(); return activenetworkinfo != null && activenetworkinfo.isconnected(); } this lets warn user if offline. however, doesn't identify if user has limited connectivity. there conditions of limited connectivity have caused users complain. these include: users connected home wifi network cable modem or internet service unavailable. users in hotel or coffee shop , connect wifi network, network requires login or agree ter

javascript - Which js files to link to the html file using Foundation 3 Orbit? -

i trying create orbit slider on website, however, when run webpage in web browser, orbit slider should be, see: $(window).load(function() { $("#featured").orbit(); }); i guessing because html document not linked correct javascript files. site linked jquery.js, foundation.min.js, , jquery.foundation.orbit.js. wrong files linked html file or there problem? the code slider's div this: <div id="featured"> <img src="example_pics/example1.jpg /> <img src="example_pics/example2.jpg /> <img src="example_pics/example3.jpg /> </div> and actual javascript this: <script type="text/javascript"> $(window).load(function() { $("#featured").orbit(); }); </script> any or tips appreciated <script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/jquery.orbit.min.js" type="text/ja

jquery - Hover to scroll down div and auto scroll to top when mouseleave -

hye. i'm working on jquery codes , codes work fine. understanding in jquery limited, can't tweak codes meet needs. so, want scroll down ".punchmeintheface" div when hovering onto , @ same time want auto scroll div top when mouseleave. <div class="punchmeintheface"> <img src="http://img29.imageshack.us/img29/2333/q4sl.jpg" alt="" /> </div> and jquery var amount = ''; function scroll() { $('.punchmeintheface').animate({ scrolltop: amount }, 100, 'linear',function() { if (amount != '') { scroll(); } }); } $('.punchmeintheface').hover(function() { amount = '+=20'; scroll(); }, function() { amount = ''; }); and css if needed .punchmeintheface { width: 640px; height: 100px; overflow-y:auto; overflow: hidden; } this current work : http://jsfiddle.net/sandalkoyak/ghlct/ p

Sum of an Array, javascript -

ok i'm working on lab assignment school in have generate 10 random numbers. code have far that. second part have have display sum of numbers using document.write or other display method, , pretty stumped. <html> <head> <title> lab 5 </title> </head> <body> <script type="text/javascript"> var numbers = new array(10); var sum = 0; var i; </script> <script type="text/javascript"> (var = 0; <10; i++) { document.write("numbers[" + + "]: " + math.floor(math.random() *100)+ "<br/>"); } </script> </body> </html> thanks help! you need edit things bit. need create random_number variable , assign random figure, can output value , add sum. hope helps! <html> <head> <title> lab 5 </title> </head> <body> <script type="text/javascript"> var numbers = new array(10); var sum = 0; var i; </scri

ios - how to cast an indirect pointer in Objective-C -

i trying work on keychain , following tutorial here unfortunately getting following error talks searching keychain cast of indirect pointer objective-c pointer 'cftyperef *' (aka 'const void **') disallowed arc this code looks like osstatus status = secitemcopymatching((__bridge cfdictionaryref)searchdictionary,(cftyperef *)&result); any providing correct code on how cast indirect pointer appreciated. use void * instead: osstatus status = secitemcopymatching((__bridge cfdictionaryref)searchdictionary,(void *)&result);

iOS Slide out menu, need it to be accessible on every View Controller -

as title suggests, how go doing that? basically, need slide out menu accessible every screen. currently, have navigation stack, have dismissviewcontroller each view controller (back button) on stack, in can launch menu. need menu launched screen. thanks have @ project it should solve problem. applied in root view , can slide anywhere.

php - How can I create filters with radio buttons in yii -

i'm new yii framework. in admin page, gridview of data. have column named approved in gridview has either 0 or 1 value. want introduce 2 radio buttons 0 , 1 filters results 0 , 1 respectively , displays it. how can create filters radio buttons you can make filter pretty anything: 'columns'=>array( array( 'name' => 'approved', 'filter' => chtml::radiobutton(...) . chtml::radiobutton(...), ), ), but if want keep things simple, feed array filter. 'columns'=>array( array( 'name' => 'approved', 'filter' => ['0','1'], ), ), it generate dropdown-list (sorry, no automatic radiobuttons) it's functional swear! if want text options provide them this: 'filter' => ['1'=>'on', '0'=>'off'], also, yii automatically generate filter if set type boolean 'columns'=>

c# - Remove other panels on the same form -

i have form (c#) , several panels on it. on 1 panel, put button remove panels on form once clicked. here code: mainform = (mainform)this.findform(); foreach (control c in mainform.controls) { if (c panel) { mainform.controls.remove(c); this.refresh(); } } the problems is: can't find panel on mainform.controls how can solve it? thank you. at least 1 problem code aren't allowed update list while you're in foreach loop. you're modifying mainform.controls @ same loop you're iterating through it. winforms silently swallows these exceptions , don't realize occurred. so try creating list of panels front, , see if works. (make sure you've got using system.linq; @ top). var panels = mainform.controls.oftype<panel>().toarray(); foreach (var panel in panels) { mainform.controls.remove(panel); }

c++ - Project loaded error after debugging -

edit: took guys' advice , program compiles. can't run because these errors. 'baseconverter.exe': loaded 'c:\users\ownert\documents\visual studio 2010 \projects\baseconverter\debug\baseconverter.exe', symbols loaded. 'baseconverter.exe': loaded 'c:\windows\system32\ntdll.dll', cannot find or open pdb file 'baseconverter.exe': loaded 'c:\windows\system32\kernel32.dll', cannot find or open pdb file 'baseconverter.exe': loaded 'c:\windows\system32\kernelbase.dll', cannot find or open pdb file 'baseconverter.exe': loaded 'c:\windows\system32\msvcp100d.dll', symbols loaded. 'baseconverter.exe': loaded 'c:\windows\system32\msvcr100d.dll', symbols loaded. program '[5320] baseconverter.exe: native' has exited code 0 (0x0). here's new updated code. fixed std::cout , have eliminated namespaces, think overloaded coding. converter.h #ifndef converter_h #define converter_h

java - Is there any way to see hidden content on a website maybe hidden cloudfront links? -

i know might sound bit crazy there way see hidden content on website? example have here http://99designs.com/web-design/contests/website-design-wanted-degrees-inc-233084 . there way see hidden images. saw source code , think there cloudfront system. any appreciated thank you it depends on how have 'hidden' content: if use display: none; or visibility: hidden; (i.e. sytlistically hide it) you can't see browser won't render item, still exist in html; if it's image, link image valid, or if text can read it. in example, using server-side code limit what emitted html - there nothing there. way people can't inspect source , hack around it.

ruby on rails - in case I have two versions of show.html.erb -

let's say, have 2 versions of show.html.erb same model. the first one, default, call show.html.erb . the second one, example - show1.html.erb . so, want use 1st 1 show on browser, , 2nd 1 print. do have create method in controller? in general possible create other views besides created scaffolding? why not use wicked_pdf gem: https://github.com/mileszs/wicked_pdf generate pdf print: add mime::type.register "application/pdf", :pdf to config/initializers/mime_types.rb in show method: def show respond_to |format| format.html format.pdf render :pdf => "file_name" end end end now you'll need create show.pdf.erb file , use printing.

php - laravel prevent unauthenticated users from viewing the files -

i want try make route filter using pattern filter, it's doesn't work. how make route prevent unauthenticated users viewing files on specific folder ? try this: route::get('/directory/{file}', array('before' => 'auth', function($file) { return public_path() . "/directory/$file"; })); change directory whatever directory trying protect. also, assumed files want deal out in public directory. may need changed too, depending on usage. auth filter created in default install of laravel. makes sure aren't "guest." let people access directory if "logged in." believe looks cookie laravel sets when log in.

java - Creating queue from two stacks -

can explain doing wrong here ? trying create queue 2 stacks per book exercise. error "stack underflow" peek function. seems right me :p please explain. thanks! //program implement queue using 2 stacks. import java.util.nosuchelementexception; public class ex3_5_stack { int n; int countofnodes=0; private node first; class node { private int item; private node next; } public ex3_5_stack() { first=null; n=0; } public int size() { return n; } public boolean isempty() { return first==null; } public void push(int item){ if (this.countofnodes>=3) { ex3_5_stack stack = new ex3_5_stack(); stack.first.item=item; n++; } else { node oldfirst = first; first = new node(); first.item=item; first.next=oldfirst; n++; } } public int pop() { if (this

dynamic - Reading parameters from RDL file from web UI - SSRS -

i have set of reports , need use single ui parameter section reports, intention report parameters layout screen read parameters collection in reports rdl file , dynamically create screen. so that: there 1 parameters screen (and not 1 per report) any parameter changes rdl file reflected not require development change parameter screen please let me know there solution this. or have use separate parameter ui each report.

c# - Extracting frames of a .avi file -

i trying write c# code extract each frame of .avi file , save provided directory. know suitable library use such purpose? note: final release must work on systems regardless of installed codec, or system architecture. must not require presence of program (like matlab) on machine. thanks in advance. tunc this not possible, unless add restrictions input avi files or have control on encoder used create them. image have decode first, , need appropriate codec installed or deployed app. , doubt possible account every codec out there or install/deploy them all. no, won't able open just any avi file. can, however, support popular (or common in context) codecs. the easiest way indeed using ffmpeg, since alredy includes of common codecs (if dont mind 30+mb added app). wrappers, used aforge wrapper in past , liked it, because of how simple work with. here example docs: // create instance of video reader videofilereader reader = new videofilereader( ); // open video fil

Java System.out.print Windows and unicode issue -

i'm printing out line overwritten (like status bar) in windows cmd.exe . i'm doing using system.out.print("\r" + filename + " " + progress) . the problem if filename utf-8, windows not correctly return beginning of line , overwrite last message. minor issue, i'd see if there solution. thanks! you might want try \r\n : system.out.print("\r" + system.getproperty("line.separator") + "bla bla");

php - Ordering an array by specific value -

i have original array this: $arr=array(10,8,13,8,5,10,10,12); and want sort become: $arr=array(10,10,10,8,8,13,12,5); to final result using way: $arr=array(10,8,13,8,5,10,10,12); // remove array contain array(1) $arr_diff=array_diff(array_count_values($arr), array(1)); // remove array contain keys of $arr_diff $arr=array_diff($arr, array_keys($arr_diff)); // sort rsort($arr); ksort($arr_diff); // unshift foreach ($arr_diff $k=>$v) { while ($v > 0) { array_unshift($arr,$k); $v--; } } // print_r($arr); my question there more simple way? thanks. $occurrences = array_count_values($arr); usort($arr, function ($a, $b) use ($occurrences) { // if occurrence equal (== 0), return value difference instead return ($occurrences[$b] - $occurrences[$a]) ?: ($b - $a); }); see reference: basic ways sort arrays , data in php .

java - File Copier keeps failing(caught the error, no error code) -

i've been making installer few of friends adding mods minecraft. created method(inside class filehandling) called filechoosercheck. gets directory installation defined user jfilechooser , sets moddir, or, if user doesn't specify, sets installation directory default directory, file 'defaultdir'. whenever run method filechoosercheck, doesn't change path moddir, when try call it(moddir) returns null. how can make filechoosercheck changes path moddir? also, why installation failing?( removed moddir altogether , set path manually , still failed) if see in code sloppy and/or could/needs improved please tell me, i've been programming swing few days, , java week[i know 1 other programming language[which pretty basic)] main class import java.awt.*; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.io.file; import java.io.ioexception; import java.net.uri; import java.net.url; import java.nio.file.path; import javax.swing.*

linux - I have installed with yum install python-devel ,but still can not find the Python.h file -

i have run command yum install python-devel ,and output : yum install python-devel loaded plugins: presto, refresh-packagekit setting install process resolving dependencies --> running transaction check ---> package python-devel.i686 0:2.6.4-25.fc13 set updated --> finished dependency resolution but when locate python.h , did not output please share solution,if know reason ,thanks lot installing package not automatically update locatedb. seeing nothing strange. if want update locatedb manually, run updatedb .

assembly - How are encoded register operands in ARM assembler ? -

i decompiled arm elf files , read assembler code. but, don't see how codes translated mnemonics. example code this: #hex code | #mnemonic | #binary 0xb480 | push {r7} | 1011 0100 1000 0000 0xb580 | push {r7, lr} | 1011 0101 1000 0000 0xb5f0 | push {r4,r5,r6,r7,lr} | 1011 0101 1111 0000 so, can see opcode push 0xb4 or 0xb5 if pushing multiple values. how list of registers created ? the first example clear, r7 coded 8th bit, set. but, why second opcode pushes lr ? there no bit flag ? there 3 encodings of push instruction in thumb mode. first 1 16 bits long , exists since armv4t (original thumb implementation): 15141312|11|109|8| 7..0 | 1 0 1 1| 0| 10|m| register_list| since register_list 8 bits, can push registers r0 r7 (and lr , if m bit set). in thumb-2 (armv6t2, armv7 , later), 2 more encodings have been added. both 32 bits long: 1514131211|109|876|5|4|3210||151413| 12 .. 0 | 1 1 1 0 1| 00

css - How to make fixed header table inside scrollable div? -

i want make header of table fixed. table present inside scrollable div. below code. <div id="table-wrapper"> <div id="table-scroll"> <table bgcolor="white" border="0" cellpadding="0" cellspacing="0" id="header-fixed" width="100%" overflow="scroll" class="scrolltable"> <thead> <tr> <th>order id</th> <th>order date</th> <th>status</th> <th>vol number</th> <th>bonus paid</th> <th>reason no bonus</th> </tr> </thead> <tbody> <tr> <td><%=snd.getorderid()%></td> <td><%=snd.getdatecapture

ios - AFNetworking parsing json deeper -

i´m using afnetworking parse json , absolutely love it. now want go lever deeper. json output looks this -result -0 rezept_id : value1 rezept_name : value2 rezept_zubereitung : value3 everything works fine until here , can parse value. goes on -rezept_bilder -0 -bigfix file : value4 file_path : value5 now want parse json attribute file value (value4) , display in image view. display image if on main. [self.restuarantimageview setimagewithurl:[nsurl urlwithstring:[self.restuarantdetail objectforkey:@"file"]]]; but how tell him file value not on main under -rezept_bilder -0 - bigfix here code using parse data point i'm stuck. -(void)makerestuarantsrequests3{ nsurl *url = [nsurl urlwithstring:@"http://api.chefkoch.de/api/1.0/api-recipe.php? zufall=1&divisor=0&limit=1"]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; afjsonrequestoperation *operation = [afjsonrequestope

asp.net mvc 3 - how can i append my meta data title ? in MVC -

currently way title added: html.addtitleparts( !string.isnullorempty(model.metatitle) ? model.name : model.metatitle ); and renders eg: <title> lukx.ru</title> i append ith text , should this: <title>очки burberry купить в интернет магазине lukx.ru</title> you can use nopcommerce methode html.appendtitleparts() append string. if need customized logic generating title inherit or extend nop.web.framework.ui.pageheadbuilder . class marked partial , every method virtual. should no problem change behavior of generating page title.

How do I select the first odd/even numbered primary key in a SQL database -

let's have simple table of values (almost key/value store). there primary key on table indexed , auto incremented. example here rows: [id] [columna] [columnb] 2 "data" "more data" 3 "data" "more data" 4 "data" "more data" 7 "data" "more data" 8 "data" "more data" 11 "data" "more data" there might 1000+ values in table. let's want select row containing first odd numbered id in table. in case should return row 3 "data" "more data" . also how select first numbered id? thanks much select id table mod(id, 2) = 1 order id limit 0, 1 use mathematical function 13 % 2 = 1 (sorry, don't know how in english, devide modulo). mysql function mod

doctrine2 - doctrine: is there a way to use associated entity in findBy -

i have entity 'employee' associated 1 or more 'manager' entities. therefore use join table , association in employee entity follows: /** * @manytomany(targetentity="manager_entity") * @jointable(name="manager_employees", * joincolumns={@joincolumn(name="emp_id", referencedcolumnname="id")}, * inversejoincolumns={@joincolumn(name="manager_id", referencedcolumnname="id", unique=true)} * ) */ protected $managers; this working. want retrieve employees of specific manager. therefore i'm asking if possible this: $mgr = $this->em->getrepository ( 'entities\manager' )->findoneby ( array ( "alias" => $this->get('alias')); // pseudo code - know $managers list of managers , $mgr cannot compared $emplist = $this->em->getrepository('entities\employee')->findby(array("managers" => $mgr)); add function repository: p

c# - Not able to see textbox in asp.net mvc page -

i entirely new asp.net mvc , first sample project need show 1 textbox in 1 view when user entered value in textbox, need display value in label in view. have done .. this controller class public class textboxcontroller : controller { // // get: /textbox/ public actionresult index() { return view(); } } and model class namespace mvctestapplication.models { public class textboxmodel { [required] [display(name= "textbox1")] public string enteredvalue { get; set; } } } and view @model mvctestapplication.models.textboxmodel @{ viewbag.title = "textboxview"; } <h2>textboxview</h2> @using (html.beginform()) { <div> <fieldset> <legend>enter textbox value</legend> <div class ="editor-label"> @html.labelfor(m => m.enteredvalue) </div> <div class="editor-field"> @html.textboxfor(m=>m.entere

oracle - identify and handle duplicate records via sql -

create table orderinfo ( ordernum varchar2(17), supplier varchar2(17), pol varchar2(17), pod varchar2(17), etd date, eta date, productcode varchar2(17), qty number(10) ) / create table orderdetail ( ordernum varchar2(17), product_code varchar2(17), productdesc varchar2(50), barcode varchar2(17), color varchar2(17), qty number(10) ) / insert orderinfo values ('or12345','tata','mumbai','cairo',to_date('21/06/2013','dd/mm/yyyy'), to_date('27/07/2013','dd/mm/yyyy'),'5025',10000 ); insert orderdetail values ('or12345','5025','metalic clips','1234567890','red',500); insert orderdetail values ('or12345','5025','metalic clips','1234567890','blue',500); insert orderdetail values ('or12345','5025','metalic clips'

wpf - High performance pivot grid for pre-aggregated data -

i have been tasked coming high performance front-end live activepivot back-end. have client-side service layer provides continuous stream ( iobservable<t> ) of pre-aggregated, pre-formatted data, metadata detailing dimensions , what-not in report. requirements can summarized as: dynamically set row , column headers based on metadata in stream. dynamically pass live data through appropriate row/column of control. highlight changes data. eg. increased values may highlight temporarily in green, decreased values in red. intercept user actions on row/column headers (ie. drill-downs) can instigate change in underlying mdx query. intercept user actions (probably double-click) on data values can instigate drill-through query (the results of displayed in separate data grid). all third party components appear geared around slicing , dicing disconnected (or updated) data sets. sacrifice performance achieve higher degree of flexibility don't need, , performance paramount s

c# 4.0 - Castle Wcf facility self hosting - Repository lifestyles -

i'm self hosting wcf services using castle windsor on windows service. before hosting them on iis , registering repository objects (am following repository pattern ef 5.0 orm) perwebrequest. working while hosting on iis because able add below line in web.config file - <system.webserver> <modules> <add name="perrequestlifestyle" type="castle.microkernel.lifestyle.perwebrequestlifestylemodule, castle.windsor" /> </modules> but self hosting. cannot add above module. assume recommended approach use perwebrequest repositories in wcf service otherwise might create issues contexts , transactions. there other lifestyle similar perwebrequest can use while doing self hosting ? or please advise if assumption wrong? thanks in advance sai update i tested repositories being registered container transient lifetstyle , fails inserts or updates. because everytime requests object container returns new object, loosing dbcontext