text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
JOIN comp e ON a.user_id=e.user_id WHERE a.user_id = ?"; $query = $this->db->query($query_str, $end_user); if($query->num_rows() > 0) { foreach($query->result_array() as $stuff) { $data[] = $stuff;
[ -0.17369477450847626, -0.004350254312157631, 0.8868125081062317, -0.3557257354259491, 0.2545289695262909, -0.11783058196306229, 0.014089256525039673, -0.33289235830307007, 0.07025429606437683, -0.422268807888031, -0.5521084070205688, 0.1663367748260498, -0.6241593956947327, 0.3412503004074...
} return $data; } else { return false; } ``` Everything is fine until I try to display the data. If
[ 0.2601059675216675, 0.1574925184249878, 0.5624552369117737, -0.24185504019260406, 0.282524049282074, -0.36976295709609985, 0.616860568523407, -0.24335023760795593, -0.290447473526001, -0.6109962463378906, -0.42289766669273376, 0.8141094446182251, -0.32267311215400696, 0.3064686954021454, ...
a user has two exp, everything else is showing up twice. I m not sure how to write this. Would it be easier to do separate them? One query for each item? ``` public function get_education() { $one_edu = $this->test_model->one_edu($end_user); if ($one_edu != false) { ...
[ 0.2154219001531601, 0.0100140031427145, 0.2832085192203522, 0.027603045105934143, 0.2645969092845917, 0.025725282728672028, 0.1433498114347458, -0.11745166033506393, -0.09486591815948486, -0.7955062389373779, -0.19523514807224274, 0.5603585243225098, -0.3461451232433319, 0.1231430396437645...
$edas) { $one_edu_html .='<p>'.$edas['objective'].'</p>'; } foreach($one_edu as $exp) {
[ -0.1490897387266159, -0.06260186433792114, 0.6793417930603027, -0.3338721990585327, 0.07624281197786331, 0.3008992373943329, 0.15160344541072845, -0.23097895085811615, -0.007900914177298546, -0.5097981691360474, -0.6692728996276855, 0.39859333634376526, -0.9602121710777283, -0.301587700843...
$one_edu_html .= '<p>'.$exp['exp_title'].'</p>'; } foreach($one_edu as $educ) { $one_edu_html .= '<p>'.$educ['edu_title'].'</p>'; }
[ -0.3581445515155792, -0.2570454776287079, 0.2892918884754181, -0.1303330659866333, -0.030859772115945816, 0.13739976286888123, -0.20799832046031952, -0.11818735301494598, -0.015605583786964417, -0.5957756638526917, -0.592240035533905, 0.4019303321838379, -0.7126867175102234, 0.052476573735...
$result = array('status' => 'ok', 'content' => $one_edu_html); echo json_encode($result); exit(); }else{ $result = array('status' =>
[ 0.0018341661198064685, -0.1211872547864914, 0.2469392567873001, -0.3722648620605469, 0.08044065535068512, 0.1289547085762024, 0.549409806728363, -0.5397409796714783, -0.09625684469938278, -0.15280425548553467, -0.34750041365623474, 0.2697397768497467, -0.4046595096588135, -0.05764390155673...
'ok', 'content' => ''); echo json_encode($result); exit(); } } ``` Now it s returning something like this: ``` Objective Exp title1 Exp title2 Edu title Edu title <- Extra ``` Using codeigniter The main reason for this is because you haven't grouped your rows...
[ -0.07668324559926987, 0.19015760719776154, 0.441191166639328, -0.16753055155277252, 0.1600620448589325, -0.04316189885139465, 0.13134150207042694, -0.29585593938827515, -0.1662714183330536, -0.405531644821167, -0.3356960713863373, 0.42358049750328064, -0.43881526589393616, 0.17616268992424...
they are different, you can group the field on a single rows, using `GROUP_CONCAT` ``` SELECT a.user_id, a.education, GROUP_CONCAT(a.edu_title SEPARATOR ",") "Edu_Title", GROUP_CONCAT(b.exp_title SEPARATOR ",") "Experience Title" ,b.experience, c.objective, d.skill, e.comp FROM edu a JOIN exp b ON a.user_id=b.user_id ...
[ 0.28928324580192566, 0.17800742387771606, 0.3100677728652954, 0.21029391884803772, -0.1119212657213211, 0.3874915540218353, -0.08361124992370605, -0.3531208336353302, -0.35110804438591003, -0.8723301887512207, -0.2803316116333008, 0.4112747311592102, 0.0403287336230278, -0.1637030988931656...
In my application I am having problem to cover completely a page of the browser window in IE8. The HTML: ``` <body class="body"> <div class="wrapper"> <div class="main-holder"> <form id="Form1" runat="server"> </form> </div> </div> </body> ``` And the CSS: ``` .body...
[ -0.11337342858314514, 0.07116656750440598, 0.7630763053894043, -0.0518539659678936, -0.07888049632310867, 0.29853031039237976, 0.24218910932540894, -0.21496187150478363, -0.046892087906599045, -0.8497613668441772, -0.20113468170166016, 0.2713841199874878, -0.20008930563926697, -0.157605946...
#1a82f7, #2F2727); background: -moz-linear-gradient(left, #2F2727, #1a82f7, #2F2727, #1a82f7, #2F2727); background: -ms-linear-gradient(left, #2F2727, #1a82f7, #2F2727, #1a82f7, #2F2727); background: -o-linear-gradient(left, #2F2727, #1a82f7, #2F2727, #1a82f7, #2F2727); background: linear-gradient(left,...
[ -0.7878392934799194, 0.07450252026319504, 0.8220534324645996, 0.17618504166603088, 0.062376007437705994, 0.39551636576652527, 0.300209641456604, 0.13010366261005402, -0.3620302975177765, -0.5927709937095642, -0.4496046304702759, 0.19225499033927917, -0.03159325197339058, 0.4615328311920166...
-moz-box-shadow: 10px 10px 10px #000; -webkit-box-shadow: 10px 10px 10px #000; box-shadow: 10px 10px 10px #000; background: -webkit-gradient(linear, left bottom, left top, from(#F8AC25), color-stop(0.05, #FFF999), color-stop(0.5, #F8AC25), color-stop(0.95, #FFF999), to(#F8AC25)); background: -webkit-lin...
[ -0.9049997329711914, 0.13503573834896088, 0.6802505850791931, -0.13253222405910492, 0.021156158298254013, 0.8956034779548645, 0.41930729150772095, -0.33736100792884827, -0.24418865144252777, -0.35450175404548645, -0.4902544915676117, 0.7273529767990112, -0.37536612153053284, -0.07675735652...
-pie-background: linear-gradient(top, #F8AC25, #FFF999 5%, #F8AC25, #FFF999 95%, #F8AC25); behavior: url(PIE.htc); } * { margin: 0; padding: 0; } body { font-family: Arial Sans-Serif; } ``` But in IE8 there are two white strips on top and bottom of the page. And for that reason the body is not cover...
[ 0.03866739943623543, -0.004008750431239605, 0.512905478477478, -0.23035641014575958, -0.18599660694599152, 0.08777398616075516, 0.19387833774089813, 0.008659517392516136, -0.11584364622831345, -0.81478351354599, -0.2557574510574341, 0.3921942710876465, -0.22912956774234772, -0.202969208359...
html or body element. Try this: ``` html, body { padding: 0; margin: 0; height: 100%; } ``` Be aware that setting height to 100% will probably give you problems when the site flows out of the canvas so the scrollbars appear. The height will then still be 100% and probably cause issues with the overflowed content.
[ 0.19100183248519897, -0.06475339084863663, 0.9104368686676025, -0.006466423626989126, -0.3752810060977936, -0.1395079493522644, 0.3386054039001465, -0.504088282585144, -0.09448254108428955, -0.6707711219787598, -0.23932085931301117, 0.5559681057929993, 0.16180697083473206, -0.4329338073730...
It seems that I get the idea of *call stack* in programming language design. But I cannot find (probably, I just don't search hard enough) any decent explanation of what *stack frame* is. So I would like to ask someone to explain it to me in a few words. A stack frame is a frame of data that gets pushed onto the stack...
[ 0.1416892260313034, -0.014399304054677486, 0.2539650499820709, -0.006979856174439192, -0.24422122538089752, 0.10135247558355331, -0.277079701423645, -0.48153457045555115, -0.14514261484146118, -0.21447017788887024, -0.19462531805038452, 0.27886873483657837, -0.1346164494752884, 0.318497776...
local variables. Together, they make the "frame," although this is likely architecture-dependent. The processor knows how many bytes are in each frame and moves the stack pointer accordingly as frames are pushed and popped off the stack. ### EDIT: There is a big difference between higher-level call stacks and the pro...
[ 0.11140809953212738, -0.07930124551057816, 0.20401935279369354, 0.22517581284046173, -0.08013628423213959, 0.05717799812555313, 0.09047000855207443, -0.006321955472230911, -0.35208913683891296, -0.6037770509719849, -0.04110722243785858, 0.5648859739303589, -0.3539409339427948, 0.0323400832...
log what went wrong with your program (at a high level). At this level, things like line numbers and method and class names are often known. By the time the processor gets the code, it has absolutely no concept of these things.
[ 0.4009407162666321, 0.15328370034694672, 0.29374900460243225, 0.5391966700553894, 0.2614407539367676, -0.35885533690452576, 0.2918631136417389, 0.25134167075157166, -0.36301031708717346, -0.5016019344329834, 0.012281100265681744, 0.25822436809539795, 0.010223940014839172, 0.055388394743204...
I've read through the various posts on SO about this, but have still not solved the problem. Here's the string that I'm trying to parse into an `NSDate` object: ``` 2012-04-08T12:00:00.00+02:00 ``` I understand that the problem is the time zone format. Here's the date format string that I'm trying: ``` yyyy-MM-dd'...
[ 0.024805933237075806, 0.2018055021762848, 0.39478349685668945, 0.021173888817429543, 0.18443189561367035, 0.024993985891342163, 0.18906715512275696, 0.2673307955265045, -0.3334762156009674, -0.7198916077613831, -0.11770046502351761, 0.42440134286880493, -0.15028482675552368, 0.118237301707...
Formatting Guide advises ["Consider Unix Functions for Fixed-Format, Unlocalized Dates"](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW12).
[ -0.012514883652329445, 0.1439822018146515, 0.40630218386650085, -0.03870835155248642, 0.053970105946063995, -0.3230457007884979, -0.4365645945072174, -0.31820347905158997, -0.26662102341651917, -0.25073856115341187, -0.4414025843143463, 0.530641496181488, 0.11929240077733994, 0.03131213784...
According to the documentation, a class's designated initializer in Objective-C must call the designated initializer of its base class. Another rule is that secondary initializers must call the designated initializer of their own class. But if the second rule is followed, why can't a designated initializer call a sec...
[ -0.2560192346572876, -0.17791107296943665, -0.0012223090743646026, 0.10072320699691772, -0.10367639362812042, -0.13268402218818665, 0.03028751164674759, -0.1500147134065628, -0.16597072780132294, -0.268393337726593, -0.2973768711090088, 0.5855216383934021, -0.3551660180091858, -0.029078185...
// initialization code here return self; } ``` It also has some secondary initializers, like this one: ``` - (id)initWithArray:(NSArray *)array { NSUInteger count = array.count; id objects[count]; [array getObjects:objects range:NSMakeRange(0, count)]; return [self initWithObjects:objects count:co...
[ -0.17630426585674286, -0.20827366411685944, 0.2788022756576538, -0.30450376868247986, -0.22361674904823303, 0.09994921833276749, 0.660641074180603, -0.45500171184539795, -0.36471670866012573, -0.3330134153366089, -0.19213569164276123, 0.6601025462150574, -0.41379910707473755, 0.07146706432...
i < count; ++i) { if (![objects[i] isEqual:@"Bob"]) { [array addObject:objects[i]]; } } return [super initWithArray:array]; } ``` What happens when you do this: ``` BobRejectingSet *noBobs = [[BobRejectingSet alloc] initWithArray:someObjects]; ``` Since you didn't override `init...
[ -0.21847426891326904, -0.08470465242862701, 0.4994203746318817, -0.3203306198120117, -0.04648800194263458, -0.10188242793083191, 0.6643761396408081, -0.36636483669281006, -0.3676137328147888, -0.23951703310012817, -0.2624153792858124, 0.4814208745956421, -0.5354300737380981, 0.111547231674...
your designated initializer override again. Unlimited recursion. Stack overflow. You get the segmentation-violation-core-dumped blues. That's why you always use super's designated initializer.
[ 0.13777735829353333, -0.45014646649360657, 0.12446575611829758, 0.1793549507856369, -0.13277344405651093, -0.0674070343375206, 0.11551850289106369, 0.2913114130496979, -0.5832961201667786, -0.43086838722229004, -0.46462491154670715, 0.3775315284729004, -0.47101765871047974, 0.1898710131645...
I'm a newbie in linux. I installed Fedora 16 OS as guest in virtualbox on Window 7. Now, I want to access share folder from Fedora. Here is something I did: * Install guest addtion [OK] * Make share folder link to virtualbox [OK]. Share folder path in Window 7: `D:\share_folder_vm` * In terminal program in fedora, I j...
[ 0.0986596941947937, 0.12669453024864197, 0.7137859463691711, -0.35710251331329346, -0.20512887835502625, -0.038145195692777634, 0.29604002833366394, -0.15482820570468903, -0.29774975776672363, -0.9557951092720032, -0.11539076268672943, 0.6934020519256592, -0.2752765119075775, 0.31344395875...
Host and `share_folder` is the folder in Fedora Guest. My question: How can I fix this problem? Install Oracle Guest Additions: `[host-hotkey (usually right Ctrl)] + [d]`, Then: ``` sudo /media/VBOXADDITIONS_4.*/VBoxLinuxAdditions.run ``` You can now enjoy: * A guest that can run at native screen resolution * Ab...
[ 0.274772971868515, 0.0267848689109087, 0.353496789932251, 0.22535662353038788, 0.06577494740486145, -0.2667696177959442, -0.09327007830142975, -0.03522119298577309, -0.34537893533706665, -0.7899570465087891, 0.016210028901696205, 0.514249861240387, -0.2371443510055542, 0.34616419672966003,...
if you don't have one: mkdir -p ~/destination Now mount it under the name you configured it with: ``` sudo mount -t vboxsf myFileName ~/destination ``` As an extra tip you can really exploit this feature to do things like: - Use guest subversion client to create repository to mounted directory (you won't have a f...
[ 0.13214737176895142, -0.5982903838157654, 0.5542380809783936, 0.2793307900428772, -0.32786688208580017, -0.1950802505016327, 0.11979059129953384, -0.26722970604896545, -0.4018422067165375, -0.5548569560050964, -0.2345023900270462, 0.7297856211662292, -0.28336095809936523, 0.201931595802307...
For some reason this only returns the name of the first item in the list no matter which item I click. I am not sure why it isn't returning the proper name. Basically I just want to find the name so I can search the list for that name so I can find its location in the array. ``` myTask.setOnItemClickListener(new O...
[ -0.12475878745317459, -0.047141868621110916, 0.7030701637268066, -0.1383376121520996, 0.1865028291940689, 0.32520800828933716, 0.4767990708351135, -0.18951594829559326, -0.23653997480869293, -0.7681406140327454, -0.09817418456077576, 0.5049679279327393, 0.010604661889374256, 0.300699144601...
// When clicked, show a toast with the TextView text String name = ((TextView)view).getText().toString(); for (int i = 0; i < ToDoActivity.myUser.taskCount; i++){ if(name == ToDoActivity.myUser.tasks[i].getTaskName()) clickTask = i;
[ -0.10627339035272598, 0.09409625828266144, 0.7609173655509949, -0.530508816242218, -0.09895181655883789, 0.02798757329583168, 0.634821355342865, -0.15911386907100677, -0.08044961094856262, -0.6293940544128418, -0.3713529109954834, 0.6059399843215942, -0.26339399814605713, 0.129520788788795...
} Intent myIntent = new Intent(view.getContext(), TaskEdit.class); view.getContext().startActivity(myIntent); } ``` Thank You Dlong If I understand what you're trying to do, you can simply use the `position` argument of `onItemClick`: ``` clickTask = position; ```
[ 0.02010456658899784, -0.07024414837360382, 0.6852083802223206, -0.2278178483247757, 0.28021565079689026, -0.15133950114250183, 0.32374563813209534, -0.13389769196510315, 0.08425915986299515, -0.6771488189697266, -0.08047877997159958, 0.8573974967002869, -0.17183728516101837, -0.13758063316...
I'm still pretty new to php and all but I've been trying to lookup(if it's even possible) to call from a child class to a parent function which executes a different child's function. I've read that child classes are not aware of each other but I thought the parent class might be. I have indeed been searching for a few...
[ 0.18234334886074066, 0.20742517709732056, 0.05536496639251709, -0.11942628771066666, -0.09485685080289841, -0.14491961896419525, 0.1933092623949051, 0.01283303089439869, -0.08427977561950684, -0.5755677223205566, -0.01167285442352295, 0.4400230646133423, 0.044336460530757904, 0.21179100871...
function dad() { echo '::'.get_class($this).' Class initiated::<br>'; $this -> daughter = new daughter(); $this -> son = new son(); } public function afunction($string) { return $this->son->test1($string); } } class daughter extends dad { function daughter() {...
[ 0.33351653814315796, -0.05555344000458717, 0.14096665382385254, -0.5508406162261963, 0.21475394070148468, 0.13876226544380188, 0.44934725761413574, -0.506761372089386, 0.0434933640062809, -0.13539107143878937, -0.349834144115448, 0.4584159553050995, -0.40128418803215027, 0.3894816935062408...
parent::afunction("test"); } } class son extends dad { function son() { echo '::'.get_class($this).' Class initiated::<br>'; } public function test1($string) { echo $string; } } $dad = new dad(); $dad->daughter->test(); ``` Any/all help is appreciated. Any `O(nlogn)` [sortin...
[ -0.12613992393016815, -0.20599670708179474, 0.08457444608211517, -0.2616652250289917, 0.14126670360565186, 0.17905834317207336, 0.12490038573741913, -0.27455806732177734, -0.1011950820684433, -0.5783384442329407, -0.43366825580596924, 0.0935719758272171, -0.14540430903434753, 0.19407621026...
pseudo code: ``` 1. create a trie from your collection. 2. do a DFS on the trie generated, and add each string to the list when you reach terminal node. ```
[ 0.2885463535785675, -0.24713771045207977, 0.4163419008255005, 0.047572061419487, 0.46498048305511475, -0.009465583600103855, -0.10755214095115662, -0.18214212357997894, 0.14272966980934143, -0.6462494134902954, -0.2036111056804657, 0.1445179134607315, -0.553506076335907, 0.2464924305677414...
I'm on Windows 7, using javah in Cygwin 1.7.13. I'm currently attempting to generate the header file for a native C++ file for my Android project. Run in the root of the project, the command I'm executing is: ``` walb@nought /cygdrive/c/Users/walb/stuff/work/workspace/SoundBites $ javah -verbose -d jni/ -classpath bi...
[ -0.04332740977406502, 0.3640941083431244, 0.8912110328674316, -0.40403929352760315, 0.1573657989501953, 0.12515610456466675, 0.4719664454460144, -0.07125188410282135, -0.06255792826414108, -0.8361513018608093, -0.3860936462879181, 0.6021153926849365, -0.2466868758201599, 0.3359993100166321...
the error message is: ``` [ Search Path: C:\Program Files\Java\jdk1.6.0_22\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_22\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_22\jre\lib\sun rsasign.jar;C:\Program Files\Java\jdk1.6.0_22\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_22\jre\lib\jce.jar;C:\Program Fil...
[ -0.37519052624702454, 0.328908771276474, 0.2595444321632385, -0.06389864534139633, 0.29010847210884094, 0.17392843961715698, 0.903830349445343, 0.14583495259284973, -0.09308835119009018, -0.7042150497436523, -0.06718701869249344, 0.6120419502258301, -0.4393291771411896, 0.11929361522197723...
I'm trying to pass my dbhelper instance from one activity to another using this code ``` private void onCategoriesClick() { private DbAdapter db; db = new DbAdapter(this); Intent i = new Intent(this, CategoriesActivity.class); Bundle b = i.getExtras(); b.putSerializable("d...
[ 0.2293969690799713, -0.30581510066986084, 0.4128708243370056, -0.20478148758411407, 0.012628809548914433, -0.07138529419898987, 0.6614974737167358, -0.40560126304626465, -0.0167456716299057, -0.7611156105995178, -0.02616201899945736, 0.41906681656837463, -0.4060499668121338, 0.282759279012...
anybody point my mistake? getExtras() returns null, because you haven't put any extras into the Intent before you call it. This means that b == null, hence the NPE. Just put the serializable in the intent directly. ``` i.putExtra("db", (Serializable) db); ``` In general, though, avoid passing serializables over inte...
[ 0.4361628592014313, 0.2954345941543579, 0.27653828263282776, -0.2236938327550888, -0.20414893329143524, 0.004740249365568161, 0.40761223435401917, -0.03888572379946709, 0.004551680758595467, -0.4808737635612488, 0.10483519732952118, 0.6711262464523315, -0.22463639080524445, -0.069796346127...
So I have a huge program and decided I should make one of the methods run in a separate thread. So I put the method in a separate class, an activated it on my form. It seemed to worked just how I wanted it to until it got to part where it gave me this error: > SendKeys cannot run inside this application because the ap...
[ 0.16783617436885834, -0.2380722314119339, 0.23704476654529572, -0.11578319221735, -0.15542396903038025, -0.08920115977525711, 0.6110281348228455, -0.03148910030722618, -0.12211411446332932, -0.4290585219860077, 0.19461993873119354, 0.41186174750328064, -0.474602073431015, 0.294892847537994...
in a Form or something. Can anyone tell me a way to simulate a keystroke without using SendKeys, OR a way to get SendKeys to work in a different, non-form thread? Your console application needs a message loop. This is done through the [Application](http://msdn.microsoft.com/en-us/library/6y6135ed.aspx) class. You wil...
[ 0.007462616078555584, 0.06578338891267776, 0.5997992157936096, 0.054976824671030045, 0.24333420395851135, 0.011962482705712318, 0.3804851174354553, -0.05640660226345062, -0.2029237300157547, -0.6197245121002197, -0.3175159692764282, 0.3350375294685364, -0.28729814291000366, 0.2298545986413...
exit. MyApplicationContext context = new MyApplicationContext(); // Run the application with the specific context. It will exit when // the task completes and calls Exit(). Application.Run(context); } Task backgroundTask; // This is the constructor of the ApplicationContex...
[ -0.29597562551498413, -0.048248130828142166, 0.6667571067810059, -0.16692711412906647, 0.4081886410713196, -0.08094260841608047, 0.4133743643760681, -0.015495562925934792, -0.11636855453252792, -0.6252909302711487, -0.2916460633277893, 0.25251299142837524, -0.2550426125526428, 0.4200487136...
backgroundTask = Task.Factory.StartNew(BackgroundTask); backgroundTask.ContinueWith(TaskComplete); } // This will allow the Application.Run(context) in the main function to // unblock. private void TaskComplete(Task src) { this.ExitThread(); } //Perform your actual work he...
[ 0.18399906158447266, -0.4760209918022156, 0.3491136431694031, -0.3285169303417206, 0.6186630725860596, 0.17919544875621796, 0.5011347532272339, -0.10307089984416962, -0.5185003876686096, -0.4841777980327606, -0.30568745732307434, 0.35832399129867554, -0.5046137571334839, -0.106530435383319...
//More stuff here } } ```
[ 0.3769531846046448, 0.4764655530452728, -0.10395269840955734, -0.0020000634249299765, 0.19594630599021912, -0.20428241789340973, 0.033936042338609695, 0.5988224148750305, -0.019682595506310463, -0.466959685087204, -0.2002897411584854, 0.46054741740226746, 0.015758054330945015, 0.2230149209...
I have an XDocument class with the XML contents already made. I basically want to open a SaveFileDialog, have the user choose a folder (not a file) in which to save the contents as an .xml file. I'm having some difficulty doing so: a) How can I use the SaveFileDialog to prompt the user to select a folder? I've only b...
[ 0.33532774448394775, -0.22207725048065186, 0.2542616128921509, 0.21949611604213715, 0.07052376866340637, -0.0338723249733448, -0.14624300599098206, 0.2768586277961731, -0.0071050627157092094, -0.6769940257072449, -0.0020696932915598154, 0.432064950466156, -0.2519699037075043, 0.11894506216...
that requires a Stream - how do I build the stream using the path? (This might be a basic question, I have almost no IO experience) a) You don't want to select a Folder, but a file name (Save\**File*\*Dialog) b) SaveFileDialog.FileName c) Look at different overloads : you have XDocument.Save(string fileName). No need...
[ 0.19052326679229736, -0.20299892127513885, 0.2848435342311859, 0.16085511445999146, 0.15068809688091278, -0.17026057839393616, 0.12140001356601715, -0.08778908848762512, 0.09976289421319962, -0.9893615245819092, -0.10140623897314072, 0.6354378461837769, -0.368202805519104, 0.13522240519523...
I've got the following code: ``` public static T GetCar<T>() where T : ICar { T objCar = default(T); if (typeof(T) == typeof(SmallCar)) { objCar = new SmallCar(""); } else if (typeof(T) == typeof(MediumCar)) { objCar = new MediumCar(""); } else if (typeof(T) == typeof(BigCar)) { ...
[ 0.0012170795816928148, -0.1554926186800003, 0.7159749865531921, -0.23517084121704102, 0.10545650869607925, 0.5406063199043274, 0.4029645323753357, -0.08835463225841522, -0.12916849553585052, -0.4652736485004425, -0.04143261909484863, 0.7731297612190247, -0.28333523869514465, 0.347572356462...
'Test.Cars' to 'T'` What Am I missing here? All car types implement the ICar interface. Thanks You cannot convert to `T` because of the fact that T isn't known at compile time. If you want to get your code to work you can change the return type to `ICar` and remove the generic `T` return type. You also can cast to `...
[ 0.5581280589103699, 0.20232999324798584, 0.09607205539941788, 0.2052777260541916, -0.23039905726909637, 0.1579478532075882, 0.10659362375736237, -0.1736181229352951, 0.1781177669763565, -0.3786359429359436, -0.030374009162187576, 0.742458164691925, -0.3753037452697754, 0.2798771560192108, ...
if (typeof(T) == typeof(SmallCar)) { objCar = new SmallCar(); } else if (typeof(T) == typeof(MediumCar)) { objCar = new MediumCar(); } else if (typeof(T) == typeof(BigCar)) { objCar = new BigCar(); } return objCar; } ``` Cast: ``` public T GetCar<T>() where T : ICar { ...
[ -0.25856778025627136, -0.28552940487861633, 0.7976090908050537, -0.15549878776073456, 0.09270457178354263, 0.5948352217674255, 0.30386433005332947, -0.24883420765399933, -0.2721986770629883, -0.2937873899936676, -0.27225667238235474, 0.8122169375419617, -0.3123898208141327, 0.4358796179294...
objCar = new SmallCar(); } else if (typeof(T) == typeof(MediumCar)) { objCar = new MediumCar(); } else if (typeof(T) == typeof(BigCar)) { objCar = new BigCar(); } return (T)objCar; } ``` New-constraint: ``` public T GetCar<T>() where T : ICar, new() { return new T(); } ```
[ -0.3621600866317749, -0.31741559505462646, 0.8232094645500183, -0.17085786163806915, -0.03802497312426567, 0.678560733795166, 0.3305850028991699, -0.06866950541734695, -0.34040164947509766, -0.37968865036964417, -0.14551149308681488, 0.8341238498687744, -0.30117133259773254, 0.354384124279...
That might be a naive git question but here it is: Before doing a pull-request, I usually create a new branch from the latest commits in the upstream and cherry-pick the important commits from my development branch. Then make a pull-request from my new branch to the remote repository. But I hate the merge-conflicts (...
[ 0.3218972086906433, -0.09471171349287033, 0.06010739877820015, 0.20453207194805145, 0.20898641645908356, 0.12573742866516113, -0.01805729605257511, -0.037552181631326675, -0.28082275390625, -0.6077731847763062, 0.07628105580806732, 0.3514115810394287, -0.03260258212685585, 0.19251266121864...
there any other tricks for minimizing the merge conflicts during cherry-picking? You should definitely cherry-pick commits in order. If you don't, they may not apply - imagine that one commit adds foo.c, and the next one modifies it. Clearly they're not going to work out of order. In general, even if it's not that obvi...
[ 0.5611464977264404, -0.01982794515788555, -0.47783413529396057, 0.15190660953521729, 0.011206472292542458, 0.09194736182689667, 0.17351719737052917, 0.06416000425815582, -0.38098177313804626, -0.5595824122428894, 0.05823422595858574, 0.6649491190910339, -0.14143244922161102, -0.18915468454...
it's more a sign that your development process isn't ideal. It means that the things you're working on in your development branch are also being changed upstream. You might be able to help yourself out by either not working on the same code others are working on, or by more frequently pulling (probably `pull --rebase`,...
[ 0.5070648193359375, -0.11763820052146912, -0.014131361618638039, 0.22853340208530426, 0.25103655457496643, 0.174596905708313, 0.006378157529979944, 0.3382209837436676, -0.23101259768009186, -0.5137033462524414, 0.06815213710069656, 0.4577767252922058, -0.002664694795385003, 0.3681440055370...
I am trying to delete the items/files in a grid view. The files are located in the `/data/my-image-folder/`. The files gets deleted at once but the UI doesn't gets updated instantly. Here is my code for that: ``` imageFilePath = /data/<my-image-folder>/"file.jpg"; File file = new File(imageFilePath); if (fi...
[ 0.2590753138065338, -0.1417197436094284, 0.9283525347709656, -0.2536267936229706, -0.05491538718342781, 0.12605148553848267, 0.4863380789756775, -0.47792473435401917, -0.06445309519767761, -0.8102818131446838, -0.2176341563463211, 0.6906307935714722, -0.40332743525505066, 0.107389815151691...
.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View gridView; if (convertView == null) { gridView = new View(context); // get layout from gridlayout.xml gridView = inflater.inflate(R.layout.gridlayout,
[ -0.11001472175121307, -0.3536473214626312, 0.8499169945716858, -0.3183896541595459, -0.008510619401931763, 0.14258061349391937, 0.2162168174982071, -0.4246480166912079, -0.1933937817811966, -0.945025622844696, -0.4041224420070648, 0.524079442024231, -0.15797972679138184, 0.1753502935171127...
null); // set value into textview TextView textView = (TextView) gridView .findViewById(R.id.grid_item_label); textView.setText(fileList[position]); System.out.println("value of fileList[position]" +
[ -0.023744244128465652, -0.34663060307502747, 0.7957128882408142, -0.3761995732784271, -0.08290260285139084, 0.05309080332517624, 0.32201439142227173, -0.4733487665653229, -0.2251662015914917, -0.5584677457809448, -0.38860800862312317, 0.5049392580986023, -0.3555026352405548, 0.059081867337...
fileList[0]); // set image ImageView imageThumbnail = (ImageView) gridView .findViewById(R.id.grid_item_image); byte[] imageData = null; try {
[ 0.15532460808753967, -0.31319287419319153, 0.6199375987052917, -0.24857504665851593, -0.07813475281000137, 0.1407710462808609, 0.2864384651184082, -0.5301399827003479, -0.16512325406074524, -0.4500417113304138, -0.13231106102466583, 0.7195324301719666, -0.2669200599193573, 0.04613418877124...
final int THUMBNAIL_SIZE = 64; FileInputStream fis = new FileInputStream(FILE_PATH + fileList[position]); Bitmap imageBitmap = BitmapFactory.decodeStream(fis);
[ -0.21092593669891357, -0.5831546783447266, 0.8240629434585571, -0.09183406829833984, 0.17991916835308075, 0.18232542276382446, 0.2608954608440399, -0.3629310131072998, -0.17457900941371918, -0.634403645992279, -0.23965740203857422, 0.32435837388038635, -0.28346455097198486, -0.041767567396...
Float width = new Float(imageBitmap.getWidth()); Float height = new Float(imageBitmap.getHeight()); Float ratio = width / height; imageBitmap = Bitmap.createScaledBitmap(imageBitmap,
[ 0.10305892676115036, -0.2329189032316208, 0.9335671067237854, 0.11013203114271164, -0.02244916558265686, 0.1412736028432846, -0.04240808263421059, -0.3784058690071106, -0.27332496643066406, -0.5549080967903137, -0.384528249502182, 0.6427181363105774, -0.013337808661162853, 0.07628920674324...
(int) (THUMBNAIL_SIZE * ratio), THUMBNAIL_SIZE, false); ByteArrayOutputStream baos = new ByteArrayOutputStream(); imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
[ -0.1213153600692749, -0.1708993762731552, 0.7965801954269409, -0.12413741648197174, -0.05390596017241478, 0.2871576249599457, -0.04777665436267853, -0.38156482577323914, -0.42039668560028076, -0.5670508146286011, -0.2329745590686798, 0.47650834918022156, -0.4398198127746582, 0.055055949836...
imageData = baos.toByteArray(); imageThumbnail.setImageBitmap(imageBitmap); } catch (Exception ex) { } } else {
[ -0.05342048034071922, -0.2493385225534439, 0.2702181935310364, -0.09836315363645554, -0.04883720725774765, -0.019273929297924042, 0.4724392890930176, -0.1195463165640831, -0.41327452659606934, -0.5503670573234558, -0.19884032011032104, 0.6115870475769043, -0.6797462701797485, 0.20519126951...
gridView = (View) convertView; } return gridView; } ``` here is my Code for grid View adapter : ``` ImageAdapter adapter = null; //ImageAdapter extends BaseAdapter if (fileList != null) { adapter = new ImageAdapter(this,
[ 0.006673049181699753, -0.3815596401691437, 0.7897053360939026, -0.46224790811538696, -0.23149777948856354, -0.025820482522249222, 0.2438671588897705, -0.3909415602684021, 0.002723214216530323, -0.9098339080810547, -0.14896319806575775, 0.733697772026062, -0.3514748811721802, 0.070855781435...
fileList); gridView.setAdapter(i); } ``` while after deleting if I do : ``` adapter.notifyDataChanged(); grid.invalidateViews(); ``` compiler complains to make the adpater as the "final" but if i make it "final" , it complains that i cant make adapter final as it will not allow the bel...
[ 0.20360532402992249, -0.10109511762857437, 1.1384211778640747, -0.2470063716173172, -0.17227618396282196, -0.1047426164150238, 0.38444557785987854, -0.6174643039703369, -0.08911401033401489, -0.9536316990852356, -0.21457791328430176, 0.6139281988143921, -0.49779391288757324, 0.100137501955...
external sd card and not for the phone filesystem.is that correct. How can I achieve it. Plz advice. Rgds, Softy You should look at : ``` adapter.notifyDataSetChanged(); grid.invalidateViews(); ``` It will notified the adapter that something changed, and redraw the grid.. Concerning ,**ACTION\_MEDIA\_MOUNTED** th...
[ 0.16570445895195007, -0.16017870604991913, 0.910382866859436, 0.09871605783700943, -0.10384668409824371, -0.11238902062177658, -0.04632000997662544, -0.7192597985267639, -0.15804147720336914, -0.4613264799118042, -0.016812922433018684, 1.1007136106491089, -0.14052578806877136, -0.081988580...
Is there any way to obtain Object array of Java Bean fields? I have some bean classes that represent database tables (Hibernate) and I need to retrieve from them Object arrays for jtable model, but it seems that the only way to do this is by calling getXXX methods for each field of each class - a lot of work to do. If ...
[ 0.17623473703861237, 0.023319317027926445, 0.17190997302532196, -0.1499023586511612, -0.1614338904619217, -0.06064583361148834, 0.2824755907058716, -0.16281402111053467, -0.08939259499311447, -0.5792561769485474, 0.3571071922779083, 0.5970969796180725, -0.49664074182510376, 0.0462253503501...
values[i] = field.get(beanInstance); i++; } ```
[ 0.15734006464481354, 0.16652940213680267, 0.28800302743911743, -0.28940248489379883, 0.043562863022089005, -0.1537678837776184, 0.24132078886032104, -0.2580932080745697, -0.20516066253185272, -0.40988776087760925, -0.12696273624897003, 0.6326996684074402, -0.5854665040969849, 0.15035292506...
I'm writing a function in node.js to query a PostgreSQL table. If the row exists, I want to return the id column from the row. If it doesn't exist, I want to insert it and return the id (`insert into ... returning id`). I've been trying variations of `case` and `if else` statements and can't seem to get it to wo...
[ -0.042476147413253784, 0.1301136314868927, 0.4182153642177582, -0.36715924739837646, -0.03491225466132164, 0.2659645080566406, 0.32146477699279785, -0.2448211908340454, 0.0623246431350708, -0.43369993567466736, -0.10451281070709229, 0.4362586736679077, -0.5562716722488403, 0.13871169090270...
id INTO v_id FROM tableFoo WHERE attr1 = p_param1 AND attr2 = p_param2; IF v_id IS NULL THEN INSERT INTO tableFoo(id, attr1, attr2) VALUES (DEFAULT, p_param1, p_param2) RETURNING id INTO v_id; END IF; RETURN v_id: END; $$ LANGUAGE plpgsql; ``` And than on the Node.js-side ...
[ -0.11166045814752579, -0.06932106614112854, 0.6700759530067444, -0.09106391668319702, 0.25079235434532166, 0.2912270426750183, 0.21559925377368927, -0.6462764143943787, -0.028094330802559853, -0.3597976863384247, -0.19185535609722137, 0.6124491691589355, -0.329133003950119, 0.2394093722105...
//errorchecking var id = result.rows[0].id; }; }); ```
[ -0.0133732995018363, 0.04808656871318817, 0.13354623317718506, -0.3664894104003906, 0.24589131772518158, 0.005804300308227539, 0.513440728187561, -0.17780767381191254, -0.10410287976264954, -0.20964939892292023, -0.34946614503860474, 0.7614477872848511, -0.2677088677883148, 0.1873315274715...
I am attempting to transition an existing program to use the new time facilities in C++11 from (homegrown) existing time classes. For real-time processing it is clear how to map the C++11 functionality into the homegrown time classes. It is less clear how the C++11 chrono time facilities can be used to support a non-re...
[ 0.4114346504211426, 0.02073526568710804, -0.0002538382541388273, -0.027593083679676056, 0.09337923675775528, -0.14993341267108917, 0.2436966896057129, -0.21228452026844025, -0.1461031287908554, -0.7076513767242432, -0.14045943319797516, 0.7160932421684265, -0.05333409830927849, -0.07168497...
appreciated and an example would be fantastic. For example, the code I will transitioning has constructs such as ``` MessageQueue::poll( Seconds( 1 ) ); ``` or ``` sleep( Minutes( 2 ) ); ``` where the `Seconds` or `Minutes` object is aware of the speed at which the program is being run at to avoid having to use ...
[ 0.42052602767944336, -0.09668298065662384, 0.42420127987861633, 0.004952470771968365, 0.19748681783676147, 0.005093606188893318, -0.011697922833263874, -0.23862917721271515, -0.2820790708065033, -0.6607350707054138, -0.04052646458148956, 0.917714536190033, 0.03807578980922699, -0.040256295...
will be sufficient depends on how you use the time durations you create. For example if you wanted to run at half speed but somewhere called: ``` std::this_thread::sleep_for(std::chrono::minutes(2)); ``` The duration would not be adjusted. Instead you'd need to use sleep\_until and provide a time point that uses you...
[ 0.3759342133998871, -0.3769390285015106, 0.7758808135986328, -0.11655832827091217, 0.3474408984184265, 0.22897903621196747, 0.2577173709869385, -0.3195778429508209, -0.514118492603302, -0.5349851846694946, -0.03373007848858833, 0.6309316754341125, -0.2665550410747528, 0.06048198044300079, ...
Clock::is_steady; static time_point now() { return time_point(start_time.time_since_epoch() + ((Clock::now() - start_time)/slowness)); } static const typename Clock::time_point start_time; }; template<typename Clock,int slowness> const typename Clock::time_point slow_clock<Clock,slowness>::start_...
[ -0.03646797314286232, -0.2396944761276245, 0.9429062008857727, -0.27452120184898376, 0.4103207588195801, 0.2694365382194519, 0.09788168966770172, -0.22380422055721283, -0.5507657527923584, -0.5639602541923523, -0.172493115067482, 0.5386416912078857, -0.17468780279159546, 0.500478208065033,...
+ std::chrono::nanoseconds(1)); std::cout << "tick\n"; } } ``` All of the functions you implement, like `MessageQueue::poll()`, will probably need to be implemented in terms of a global clock typedef. Of course none of this has anything to do with with how fast the program actually runs, except insofar a...
[ 0.14405547082424164, -0.09432239085435867, 0.5186240673065186, -0.18202367424964905, 0.07932639122009277, 0.03951684758067131, 0.11188133805990219, -0.14415602385997772, -0.36331871151924133, -0.5594696998596191, 0.1104968786239624, 0.4569586515426636, -0.3232342004776001, 0.12314104288816...
longer, sleep\_until will take be longer, but operations that don't wait for some time point in the future will simply appear to be faster. ``` // appears to run a million times faster than normal according to (finish-start) auto start = slow_clock<steady_clock,1000000>::now(); do_slow_operation(); auto finish = slow_...
[ 0.49634525179862976, -0.1257360875606537, 0.7443459630012512, -0.281583309173584, 0.667966902256012, -0.07345344126224518, 0.3134380280971527, 0.006724600680172443, -0.4641129672527313, -0.6466199159622192, -0.10673349350690842, 0.5846349000930786, -0.08117862045764923, 0.06274238973855972...
I want to call a function in a remote process of an injected DLL that I've made. I have successfully injected my DLL with: ``` CreateRemoteThread(pHandle, NULL, 0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle("kernel32"), "LoadLibraryA"), pLibRemote, 0, NULL); ``` The DllMain is executed and the DLL is ru...
[ 0.23221293091773987, 0.09859324991703033, 0.3465223014354706, -0.017993038520216942, 0.1511908769607544, -0.1407204121351242, 0.2869606912136078, -0.10390175133943558, -0.08880264312028885, -0.4823787808418274, -0.29808539152145386, 0.8806197047233582, -0.45715588331222534, 0.3871947526931...
the base of the DLL as it is mapped into your process (if at all). So what you need to do is first make sure to export the function in the DLL. You can do as you have done or create a `.def` file as shown [here](http://msdn.microsoft.com/en-us/library/d91k01sh%28v=vs.80%29.aspx). Thereafter: **In Theory** 1. Inject t...
[ 0.2313511222600937, -0.16793647408485413, 0.5353609919548035, -0.12323110550642014, -0.10190507769584656, -0.35062000155448914, 0.03156167268753052, -0.24244441092014313, -0.05246030166745186, -0.7558655738830566, -0.3418794870376587, 0.5761832594871521, -0.3097224235534668, 0.027861457318...
at this location. --- **In Practice** When doing your DLL injection, it is possible for you to get the base that your DLL is loaded into the target. ``` HMODULE hInjected; hThread = CreateRemoteThread( hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)( GetProcAddress( hMod, "LoadLibraryW" ) ), lpAddress, 0, ...
[ 0.2683246433734894, -0.03286406397819519, 0.840156614780426, -0.19798250496387482, 0.17403289675712585, -0.06021028012037277, 0.08962981402873993, -0.4189869463443756, 0.06865084916353226, -0.5340979695320129, -0.14248472452163696, 0.6207656860351562, -0.3437230587005615, -0.07639802247285...
// Load payload in our own virtual address space HMODULE hLoaded = LoadLibrary( lpPath ); if( hLoaded == NULL ) { return NULL; } else { void* lpFunc = GetProcAddress( hLoaded, lpFunctionName ); DWORD dwOffset = (char*)lpFunc - (char*)hLoaded; FreeLibrary( hLoaded ); return (DWORD)hPayloadB...
[ 0.14526352286338806, -0.04097510874271393, 0.6672230362892151, -0.23229560256004333, 0.2948625981807709, -0.04088986665010452, -0.11648792028427124, -0.31099286675453186, -0.2870926856994629, -0.48622602224349976, -0.37976035475730896, 0.7253353595733643, -0.5282691121101379, -0.0008675367...
the offset of the function from the base of the DLL. Adding this offset to the `hInjected` we got earlier will tell us where the `CreateRemoteThread` call should be made. So you could make a call like so: ``` BOOL InitPayload( HANDLE hProcess, LPCWSTR lpPath, HMODULE hPayloadBase, HWND hwndDlg ) { void* lpInit = Get...
[ 0.17194263637065887, -0.1462593525648117, 0.7122864127159119, -0.20013685524463654, 0.11855963617563248, 0.09302839636802673, -0.279701292514801, -0.4146019220352173, -0.17972123622894287, -0.4315827786922455, -0.034757521003484726, 0.8972856402397156, -0.4193851053714752, 0.02968998812139...
hThread == NULL ) { return FALSE; } else { CloseHandle( hThread ); } } return TRUE; } ``` This is all code that is ripped out of an [old project I have](http://code.google.com/p/mpi-client/source/browse/trunk/MPI%20Client/MPI.c). You're welcome to take the code and do whatever you want with i...
[ 0.33867764472961426, 0.30601710081100464, 0.2124655395746231, -0.07521140575408936, 0.030966831371188164, -0.3267875909805298, 0.4633917212486267, 0.12213607877492905, -0.17266255617141724, -0.63760906457901, -0.4272235333919525, 0.30585232377052307, -0.3376721739768982, 0.3980425596237182...
I need to know some basic information on the for command in batch scripts. One thing I want to know is why its %%variable instead of %variable%. Calling `GetModuleHandle` as you have will get the base of the DLL as it is mapped into your process (if at all). So what you need to do is first make sure to export the funct...
[ 0.5419583320617676, -0.09412752836942673, 0.4592750370502472, -0.22281791269779205, -0.07840709388256073, 0.06475890427827835, 0.17161360383033752, -0.1663099229335785, 0.0178061556071043, -0.7587480545043945, -0.2588613033294678, 0.6441788077354431, -0.2717711627483368, 0.1982911378145218...
DLL to the current process. Use `GetProcAddress` to find the offset between the exported function and the base of the DLL. 3. Add this offset to the base address obtained from step 1. `CreateRemoteThread` at this location. --- **In Practice** When doing your DLL injection, it is possible for you to get the base that...
[ 0.06554794311523438, -0.159767746925354, 0.8535176515579224, -0.24626615643501282, 0.11571825295686722, -0.13711503148078918, 0.06677450239658356, -0.4025730490684509, -0.013523535802960396, -0.48555639386177063, -0.2828855514526367, 0.7710437774658203, -0.6123480200767517, -0.012723439373...
GetExitCodeThread( hThread, ( LPDWORD )&hInjected ); CloseHandle( hThread ); } ``` `hInjected` will be the base of the injected DLL. I then have another function: ``` void* GetPayloadExportAddr( LPCWSTR lpPath, HMODULE hPayloadBase, LPCSTR lpFunctionName ) { // Load payload in our own virtual address space HMO...
[ 0.17919491231441498, -0.14459151029586792, 0.7890638113021851, -0.2829992175102234, 0.11901658773422241, 0.015469281002879143, 0.037539612501859665, -0.39003363251686096, 0.01788652502000332, -0.4534035623073578, -0.4956400692462921, 0.72198086977005, -0.5249918103218079, -0.13122497498989...
} } ``` What this does is first load the payload into our own virtual address space. Afterwards, we can use `GetProcAddress` to get the address of the exported function. From this, we can get the offset of the function from the base of the DLL. Adding this offset to the `hInjected` we got earlier will tell us where ...
[ 0.04260524362325668, 0.024151358753442764, 0.5446156859397888, -0.2087542861700058, 0.21661487221717834, -0.08914090692996979, -0.19966484606266022, -0.1444266140460968, -0.23278695344924927, -0.5557519197463989, -0.23446011543273926, 0.6279605031013489, -0.5308975577354431, 0.097730152308...
return FALSE; } else { HANDLE hThread = CreateRemoteThread( hProcess, NULL, 0, lpInit, hwndDlg, 0, NULL ); if( hThread == NULL ) { return FALSE; } else { CloseHandle( hThread ); } } return TRUE; } ``` This is all code that is ripped out of an [old project I have](http://cod...
[ 0.2590995728969574, 0.2491225153207779, 0.4419955611228943, 0.10180798172950745, 0.09878631681203842, -0.1928199827671051, 0.36935028433799744, -0.07266207784414291, -0.23182213306427002, -0.4245682954788208, -0.5170125365257263, 0.49405065178871155, -0.31986570358276367, 0.370677679777145...
to rewrite the code now, I would do a lot of things differently.
[ 0.5230014324188232, 0.3149721920490265, -0.06548285484313965, -0.08168279379606247, 0.01671004295349121, -0.10489924997091293, 0.46572133898735046, -0.08409788459539413, -0.15522509813308716, -0.43763136863708496, 0.2700199782848358, 0.12004125863313675, -0.054628144949674606, 0.1827538460...
I'm currently developing and I came up to the following question: How can/should I store basic information, such as unlocked items and levels between devices. Of course, I store them within preference files. But what if the user buys a new phone and wants to continue playing on there? (Shared-)Preferences won't be dup...
[ 0.46915680170059204, -0.11367353796958923, 0.29046523571014404, 0.21007800102233887, 0.45707330107688904, -0.0483776330947876, -0.08331963419914246, -0.08641202002763748, -0.01718377135694027, -0.5740012526512146, -0.040994878858327866, 0.7526893019676208, -0.017772968858480453, 0.08272161...
can do as you have done or create a `.def` file as shown [here](http://msdn.microsoft.com/en-us/library/d91k01sh%28v=vs.80%29.aspx). Thereafter: **In Theory** 1. Inject the DLL to the target process and get the base address it was loaded at 2. Inject the DLL to the current process. Use `GetProcAddress` to find the of...
[ 0.36274391412734985, -0.163225919008255, 0.7721472382545471, 0.0667276382446289, 0.06538736075162888, -0.18202944099903107, 0.19373346865177155, -0.4557192027568817, -0.11361349374055862, -0.598901093006134, -0.33474743366241455, 0.7289456129074097, -0.25171589851379395, -0.083808697760105...
(LPTHREAD_START_ROUTINE)( GetProcAddress( hMod, "LoadLibraryW" ) ), lpAddress, 0, NULL ); // Locate address our payload was loaded if( hThread != 0 ) { WaitForSingleObject( hThread, INFINITE ); GetExitCodeThread( hThread, ( LPDWORD )&hInjected ); CloseHandle( hThread ); } ``` `hInjected` will be the base...
[ 0.0979641005396843, -0.12083637714385986, 0.6423248052597046, -0.26440122723579407, 0.14289584755897522, 0.008132075890898705, 0.014074431732296944, -0.3178199529647827, 0.016490738838911057, -0.3253498673439026, -0.17341972887516022, 0.66205894947052, -0.5978196859359741, -0.1049537658691...
void* lpFunc = GetProcAddress( hLoaded, lpFunctionName ); DWORD dwOffset = (char*)lpFunc - (char*)hLoaded; FreeLibrary( hLoaded ); return (DWORD)hPayloadBase + dwOffset; } } ``` What this does is first load the payload into our own virtual address space. Afterwards, we can use `GetProcAddress` to ge...
[ 0.2848357856273651, 0.028508340939879417, 0.5003348588943481, -0.27061882615089417, 0.24118034541606903, -0.17783156037330627, -0.1087278500199318, -0.18045586347579956, -0.2091285139322281, -0.38594767451286316, -0.3397294282913208, 0.7608895897865295, -0.5269107818603516, 0.0571057200431...
make a call like so: ``` BOOL InitPayload( HANDLE hProcess, LPCWSTR lpPath, HMODULE hPayloadBase, HWND hwndDlg ) { void* lpInit = GetPayloadExportAddr( lpPath, hPayloadBase, "Init" ); if( lpInit == NULL ) { return FALSE; } else { HANDLE hThread = CreateRemoteThread( hProcess, NULL, 0, lpInit, hwn...
[ -0.003175044432282448, -0.022051971405744553, 0.6988487839698792, -0.20243099331855774, 0.0991334617137909, 0.03557906299829483, 0.15297642350196838, -0.39203310012817383, -0.18447445333003998, -0.355903685092926, -0.3906238377094269, 0.7492652535438538, -0.622140109539032, 0.1261114329099...
return TRUE; } ``` This is all code that is ripped out of an [old project I have](http://code.google.com/p/mpi-client/source/browse/trunk/MPI%20Client/MPI.c). You're welcome to take the code and do whatever you want with it but I know if I were to rewrite the code now, I would do a lot of things differently.
[ 0.360521137714386, 0.1842082291841507, 0.0646199956536293, -0.06358552724123001, -0.040593523532152176, -0.32744747400283813, 0.395008385181427, 0.363359659910202, 0.11523027718067169, -0.5491509437561035, -0.2437308430671692, 0.5190457105636597, -0.31093892455101013, 0.30387434363365173, ...
I want to write one single bit to a binary file. ``` using (FileStream fileStream = new FileStream(@"myfile.bin", FileMode.Create)) using (BinaryWriter binaryWriter = new BinaryWriter(fileStream)) { binaryWriter.Write((bool)10); } ``` Something like `binaryWriter.Write((bit)1);` When I use `binaryWriter.Write...
[ 0.28251972794532776, 0.18606357276439667, 0.25905969738960266, -0.08203277736902237, 0.17614006996154785, 0.45888254046440125, 0.3194824159145355, -0.40563711524009705, -0.16482001543045044, -0.5593163371086121, -0.0932854413986206, 0.1946839541196823, -0.10897446423768997, 0.2721385061740...
I have been struggling with this all day. I have an html table in a string. ``` <TABLE> <TBODY> <TR CLASS=dna1> <TD></TD><TD></TD><TD></TD><TD></TD> </TR> <TR CLASS=dna2> <TD></TD><TD></TD><TD></TD><TD></TD> </TR> repeat... ``` Inside the `<TD>` are some `<DIV`> and `<SPAN>` that...
[ 0.20713913440704346, -0.11163521558046341, 0.23672173917293549, -0.10434453189373016, -0.08997442573308945, 0.16448286175727844, 0.2960367202758789, -0.5705506205558777, -0.09678932279348373, -0.8857541084289551, 0.25751838088035583, 0.36974605917930603, -0.2201322466135025, 0.198324784636...
actual html? If you must save the HTML as a string, there is [DOMDocument::saveHTML](http://www.php.net/manual/en/domdocument.savehtml.php) ``` $elems = $xpath->query('//tr'); foreach ($elems as $elem) { $array[] = $doc->saveHTML($elem); } ``` *(Note that the parameter for `saveHTML` is available as of PHP 5.3.6....
[ 0.12085941433906555, -0.056869976222515106, 0.8695368766784668, -0.0069465646520257, -0.13895639777183533, 0.10983675718307495, 0.19011197984218597, 0.005697824992239475, -0.19052210450172424, -0.6479426622390747, -0.22620664536952972, 0.6086300015449524, -0.0765058845281601, -0.2130692899...
I really want Resharper to format my line-wrapped ternaries in this way ``` return navigator.IsTerminating ? navigator.Context : navigator.Context.GetSimulatableRelative(new Navigator(navigator)); ``` Can anyone help with this? I don't think there is an out of the box way of doing this. The only way i kn...
[ 0.2307620495557785, -0.05656316876411438, 0.44696709513664246, -0.0064590671099722385, -0.28325700759887695, -0.12418235093355179, 0.3010249435901642, -0.31268811225891113, -0.03854408487677574, -0.7482475638389587, 0.05058210343122482, 0.8881205320358276, -0.10070428252220154, -0.09815733...
Docs](http://confluence.jetbrains.net/display/ReSharper/ReSharper+6+Plugin+Development) * [SDK](http://www.jetbrains.com/resharper/download/) * [A video tutorial](http://blogs.jetbrains.com/dotnet/2012/01/introducing-resharper-61-sdk/)
[ -0.025413289666175842, -0.17814870178699493, 0.5146363377571106, 0.2739082872867584, 0.17731279134750366, -0.060201168060302734, -0.2335105687379837, -0.2061033844947815, -0.22158561646938324, -0.5525252223014832, -0.5403478145599365, 0.5488820672035217, -0.139500692486763, -0.068879365921...
I have a jdialog and want close it on confirmation after that store the data of a text box... now I have no problem to store the data from the box but, How can I close this dialog after the operation??? Seems a simple thing but I haven't found the solution. ``` public class test extends JDialog { private final ...
[ 0.40891438722610474, -0.10806979238986969, 0.6122480034828186, -0.10252008587121964, 0.15985600650310516, 0.10893843322992325, 0.4128592610359192, -0.37769126892089844, 0.2388342022895813, -0.7782841324806213, -0.29285934567451477, 0.6350412964820862, -0.2258882075548172, -0.11781581491231...
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); { JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); ...
[ -0.26477548480033875, -0.3833649456501007, 0.8532792925834656, -0.013211800716817379, 0.22161419689655304, 0.36412543058395386, 0.4225617051124573, -0.04427001625299454, -0.21153628826141357, -0.4818074405193329, -0.7182937264442444, 0.26642143726348877, -0.38454926013946533, 0.30172610282...
new JButton("OK"); okButton.setActionCommand("OK"); buttonPane.add(okButton); getRootPane().setDefaultButton(okButton); okButton.addActionListener(new java.awt.event.ActionListener() {
[ -0.1461016833782196, -0.46326205134391785, 0.36600247025489807, -0.5602371692657471, 0.2534080743789673, 0.36110687255859375, 0.5469169020652771, -0.566251814365387, -0.23093058168888092, -0.5188645124435425, -0.6017517447471619, 0.7292331457138062, -0.5641616582870483, -0.2055210173130035...
public void actionPerformed(java.awt.event.ActionEvent e) { try{ int x=Integer.parseInt(textField.getText()); saver.saveN(x);
[ 0.12718695402145386, -0.48923030495643616, 0.08218590915203094, -0.19523590803146362, 0.1606975644826889, 0.3343716859817505, 0.6399126648902893, -0.19023175537586212, -0.0035546286962926388, -0.32915616035461426, -0.4936850965023041, 0.6459766030311584, -0.580532431602478, -0.034480910748...
}catch(Exception ecc){ JOptionPane.showMessageDialog(Test.this,"error"); } } });
[ -0.04952394217252731, -0.35628485679626465, 0.05663122609257698, -0.40670353174209595, 0.3541257083415985, -0.2695254385471344, 0.3656976819038391, -0.1088067814707756, -0.2534155547618866, -0.20798814296722412, -0.45854973793029785, 0.5163455009460449, -0.3816157281398773, -0.057286206632...