text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
{ float score = (ideal[j] - ret[j])/ret[j]; if (score > bestScore) { target = j; bestScore = score; } } /* Allocate an additional value to the target. */ ret[target]++; } ``` Or more simply, you could just set the last value in the list to whatever is outst...
[ -0.24388036131858826, -0.31593117117881775, 0.6125905513763428, -0.14759813249111176, 0.26506757736206055, 0.09218252450227737, 0.030978094786405563, -0.6978880763053894, -0.06716916710138321, -0.34565049409866333, -0.18757416307926178, 0.6358049511909485, -0.08955132961273193, -0.13832910...
doing all the others. That does statistically skew the output, however.
[ 0.1589471995830536, 0.05818083509802818, 0.13210497796535492, 0.16569796204566956, -0.07413434982299805, 0.010624740272760391, 0.005730010569095612, -0.44753170013427734, -0.15767604112625122, -0.18651297688484192, 0.22394561767578125, 0.8026466369628906, 0.08084160834550858, -0.1877667605...
How would I go about dynamically adjusting the height of a `UIScrollView`? Basically I have a bunch of `UILabels` that are created (the exact number of UILabels is random) and the `UIScrollView` is to adjust its height automatically to accommodate the `UILables`. This is what I have thus far in the `viewDidLoad`. ``` ...
[ -0.06842118501663208, -0.16688942909240723, 1.0025748014450073, 0.1463889628648758, -0.05237816274166107, -0.008880832232534885, 0.043468181043863297, -0.4805176556110382, -0.11038496345281601, -0.4278405010700226, 0.05044903606176376, 0.6698997616767883, 0.04502030462026596, -0.0527689605...
creates additional UILavels ``` -(IBAction)scheduale{ int i; for(i=0; i<[self retrieveTime] ; i++){ //Add time label UILabel *timeLabel = [[UILabel alloc] init]; timeLabel.frame = CGRectMake(10, (i+1) * 21, 31, 20); timeLabel.textColor = [UIColor whiteColor]; timeLabel.backgroundColor = [UIColor co...
[ 0.009966045618057251, -0.23229201138019562, 0.7485257387161255, 0.1065373495221138, 0.2177802324295044, 0.3493950068950653, 0.2382853776216507, -0.5514522790908813, -0.2580548822879791, -0.597502589225769, -0.344196617603302, 0.18519556522369385, -0.26635274291038513, 0.18272848427295685, ...
many labels you are adding and their height to set the content size when you are done creating labels. See adjusted code below: ``` -(IBAction)scheduale{ int i; int contentSize = 0; for(i=0; i<[self retrieveTime] ; i++){ UILabel *timeLabel = [[UILabel alloc] init]; timeLabel.frame = CGRectMake(10, (i+...
[ 0.25508514046669006, -0.3167268633842468, 0.5116984248161316, -0.14323373138904572, 0.12790639698505402, 0.0597347617149353, 0.3644937574863434, -0.7083263993263245, -0.08654345571994781, -0.6373639106750488, -0.20662540197372437, 0.2264234572649002, -0.2463858723640442, 0.2086490541696548...
timeLabel.text = labelString; timeLabel.textAlignment = UITextAlignmentCenter; //theLabel.tag = (i+1) * 100; [scroller addSubview:timeLabel]; } [scroller setContentSize:CGSizeMake(320, contentSize)]; ```
[ -0.10878857225179672, -0.25601643323898315, 0.9033231139183044, 0.07421556860208511, 0.27418044209480286, -0.07066645473241806, 0.26694175601005554, -0.42879289388656616, -0.010579800233244896, -0.7292836904525757, -0.46713870763778687, 0.38424304127693176, -0.12562458217144012, 0.30230164...
I have a table in MYSQL with a column called league. When I try to sort the values using this query I cant get it to sort correctly. ``` SELECT DISTINCT ( t.league ) FROM teams t GROUP BY t.league ORDER BY t.league ASC ``` However with this I get: ``` 11a12 13 14 15 16a17 5a7 8a10 ``` it looks like it sorts all...
[ -0.2969124913215637, -0.032259806990623474, 0.2932524085044861, -0.023173248395323753, -0.5288199186325073, 0.18529154360294342, -0.052384231239557266, -0.26715290546417236, -0.283925324678421, -0.7276135087013245, 0.16619440913200378, 0.05207795649766922, -0.16916882991790771, -0.09966174...
> **Possible Duplicate:** > > [Writing an SQL query to SELECT item from the following table](https://stackoverflow.com/questions/10020369/writing-an-sql-query-to-select-item-from-the-following-table) I am trying to list the names of the suppliers (sname) and part number (pnum) of suppliers who had a shipment of at ...
[ 0.31983456015586853, -0.24189814925193787, 0.5620635151863098, -0.09492926299571991, 0.03728431463241577, 0.47121551632881165, -0.16472022235393524, -0.4605138897895813, -0.3730417788028717, -0.3557804226875305, 0.2206592559814453, 0.3630228638648987, 0.012414690107107162, 0.15803039073944...
value="Accept" onClick="EnableSubmit(this)"> I agree to Terms of Service agreement. </td> ``` Reason it's not working: you're not passing your function anything. Actually, because you've not used parentheses with the function name, you've not called the function at all. Passing it `this` in the context of the `onclic...
[ 0.14859840273857117, 0.023144498467445374, 0.6131447553634644, -0.2337980568408966, 0.06699533760547638, -0.40091487765312195, 0.4727728068828583, -0.3976895213127136, 0.273080050945282, -0.22545240819454193, -0.2066720873117447, 0.6676857471466064, -0.28495025634765625, -0.091147705912590...
I'm having trouble with following EF lambda expressions. ``` partial void StatusCallBackRequired_PreprocessQuery(ref IQueryable<PatientsTelephoneFollowupDetail> query) { var newList = PatientsTelephoneFollowupDetails.OrderBy(x => x.Id).ToList(); query = query.Where(p => p.PatientsMasterItem.PatientsTelephoneFo...
[ 0.08941109478473663, 0.1497657299041748, 0.7447249889373779, -0.1776309609413147, 0.16587956249713898, 0.1572965681552887, 0.3174625635147095, -0.4377087354660034, -0.3163851797580719, -0.7278681397438049, 0.07021000981330872, 0.434279203414917, -0.23543280363082886, 0.29941943287849426, ...
description here](https://i.stack.imgur.com/jPBaj.jpg) However the current output is ![enter image description here](https://i.stack.imgur.com/kC6vo.jpg) Changing query to query.select returns only one record but it's is the wrong record. Change your HTML to this: ``` <td width="30%">Do you accept Terms of Service...
[ 0.1583993136882782, -0.1909625381231308, 0.7551382184028625, -0.06388209760189056, -0.02252602018415928, -0.0888291597366333, 0.3154662549495697, -0.7215757966041565, 0.06704317778348923, -0.5657569766044617, -0.1660906821489334, 0.7603300213813782, -0.27102988958358765, -0.095216073095798...
object, giving you access to its `checked` property.
[ 0.15795305371284485, 0.05377796292304993, 0.1555524468421936, 0.3903449773788452, 0.010736255906522274, -0.43860068917274475, -0.1208764910697937, 0.17842797935009003, -0.16775305569171906, -0.38061413168907166, -0.27747026085853577, 0.20723944902420044, 0.08757416158914566, 0.376075834035...
I have a Sinatra app that, boiled down, looks basically like this: ``` class MyApp < Sinatra::Base configure :production do myConfigVar = read_config_file() end configure :development do myConfigVar = read_config_file() end def read_config_file() # interpret a config file end end ``` Unfo...
[ 0.15141786634922028, 0.30488601326942444, 0.33869311213493347, -0.16511952877044678, 0.06969134509563446, 0.030249228700995445, 0.24850685894489288, -0.46077337861061096, -0.23944894969463348, -0.480203777551651, 0.02048449032008648, 0.7857939004898071, -0.4797927737236023, 0.0513585358858...
the wrong way? It seems the `configure` block is executed as the file is read. You simply need to move the definition of your method before the configure block, and convert it to a class method: ``` class MyApp < Sinatra::Base def self.read_config_file() # interpret a config file end configure :production ...
[ 0.3759743571281433, 0.1770593523979187, 0.36774277687072754, -0.09382759034633636, 0.36284586787223816, -0.1410987675189972, 0.30537348985671997, -0.3632178008556366, -0.1648891270160675, -0.3395579159259796, -0.24877677857875824, 0.5172887444496155, -0.3452283442020416, 0.2437987774610519...
Who would of thought getting a dialog box to show would be so difficult. In C# it is so easy. I've looked all over line for help and every tip seems to cause me trouble than good. Can someone please look at the below code and tell me where I might have gone wrong? What I want is very simple. User clicks button. Then l...
[ 0.49369993805885315, 0.04585256054997444, 0.3307226598262787, 0.10704251378774643, -0.02223099023103714, 0.05178981274366379, 0.3391343355178833, -0.006993258371949196, -0.11845756322145462, -0.5831227898597717, -0.021386971697211266, 0.7296096682548523, -0.2057397961616516, 0.155844166874...
seeing nothing. I'm open to suggestions on how to fix it, or new code all together. Sorry, the log has no error messages. Please be specific about where I put the code as I'm an Android noob. And thank you in advance! ``` public class SetPrediction extends Activity { Button btnInsrt, btnFTeam, btnSTeam; Arra...
[ 0.46809110045433044, -0.3620384633541107, 0.7613230347633362, -0.20539894700050354, 0.12202756851911545, 0.017736759036779404, 0.6511781811714172, -0.249476358294487, -0.20699167251586914, -0.7150406241416931, -0.352120578289032, 0.7370657324790955, -0.46110105514526367, 0.0269302837550640...
ListView listView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.set_prediction); nameValuePairs = new ArrayList<NameValuePair>(); txtGameTeams = (TextView) findViewById(R.id.txtGameTeams); ...
[ 0.36925429105758667, -0.6777127981185913, 0.8382459282875061, -0.13615354895591736, -0.0457041971385479, 0.01628287509083748, 0.3536733388900757, -0.691826343536377, -0.3955724537372589, -0.5705124735832214, -0.43667134642601013, 0.7164815068244934, -0.2550217807292938, 0.12219195812940598...
= (Button) findViewById(R.id.btnInsert); btnFTeam = (Button) findViewById(R.id.btnFirstTeam); btnSTeam = (Button) findViewById(R.id.btnSecondTeam); btnFTeam.setText(removeSpaces(game.split("vs")[0])); btnSTeam.setText(removeSpaces(game.split("vs")[1])); btnSTeam.setOnClickListe...
[ -0.256884902715683, -0.4716218113899231, 0.6963411569595337, -0.23331330716609955, 0.09704650938510895, 0.3991934657096863, 0.5385460257530212, -0.45818883180618286, -0.44777825474739075, -0.7606889605522156, -0.4226977229118347, 0.7042747735977173, -0.29262617230415344, 0.2174879908561706...
String result = ""; ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("players", removeSpaces(game.split("vs")[1]))); fNames = new ArrayList<String>(); listView = (ListView) findViewById(R....
[ -0.19375361502170563, -0.47562435269355774, 0.5105153918266296, -0.35268649458885193, 0.020335927605628967, 0.09150061756372452, 0.23583318293094635, -0.5018202662467957, -0.26176589727401733, -0.6042351126670837, -0.48160994052886963, 0.4236431419849396, -0.13212203979492188, 0.3032632470...
try { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://xxxxx/getTeamPlayers.php"); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
[ -0.13955353200435638, -0.3821638226509094, 0.5897443294525146, -0.15269890427589417, -0.013762868009507656, 0.03506045415997505, 0.5718222856521606, -0.38846927881240845, 0.14050249755382538, -0.7657455801963806, -0.5204024314880371, 0.28715986013412476, -0.5315501689910889, 0.248829722404...
HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); InputStream is = entity.getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
[ -0.47478121519088745, -0.5379181504249573, 0.8362809419631958, -0.07065889239311218, -0.25508230924606323, 0.24064116179943085, 0.32170018553733826, -0.4171574115753174, -0.2874031066894531, -0.7328528165817261, -0.4576456546783447, 0.3099443316459656, -0.42147892713546753, 0.1918313056230...
StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) {
[ -0.2567075192928314, -0.4008274972438812, 0.5449360013008118, -0.4076407849788666, -0.16770297288894653, 0.3144591450691223, 0.7679449319839478, -0.6578338146209717, -0.023904159665107727, -0.4671691358089447, -0.3606557250022888, 0.0002711172273848206, -0.5743035078048706, 0.3721710741519...
sb.append(line + "\n"); } is.close(); result=sb.toString(); }
[ -0.1759098321199417, -0.26348716020584106, 0.7158247232437134, -0.7150115966796875, -0.05130217596888542, 0.2593216300010681, 0.5376129746437073, -0.8561535477638245, -0.03916686028242111, -0.5924528241157532, -0.42293688654899597, 0.03310053423047066, -0.5850163698196411, -0.0006184040103...
catch(Exception e) { Log.e("log_tag", "Error in http connection " + e.toString()); } //parse json data try
[ 0.05244210734963417, -0.40528497099876404, 0.0035376432351768017, -0.02055157907307148, 0.24450157582759857, -0.1385369598865509, 0.28710877895355225, -0.2177504599094391, -0.16446715593338013, -0.3193085193634033, -0.4576738178730011, 0.40776264667510986, -0.49082091450691223, -0.15845631...
{ JSONArray jArray = new JSONArray(result); for(int i=0;i<jArray.length();i++) fNames.add(jArray.getJSONObject(i).getString("First_Name"));
[ -0.17981402575969696, -0.3498763144016266, 0.7422673106193542, -0.5085864067077637, 0.06117064878344536, 0.34197068214416504, 0.4878344237804413, -0.6116180419921875, -0.13671642541885376, -0.5710107088088989, -0.3131016492843628, 0.47680020332336426, -0.29110488295555115, 0.26986235380172...
} catch(JSONException e) { Log.e("log_tag", "Error parsing data " + e.toString()); } ArrayAdapter<String> adapter = new ArrayAdapter<String>(SetPrediction.this, android.R.layout.simple_list_item_1, fNames);
[ 0.11782623827457428, -0.5418275594711304, 0.3718862533569336, -0.4196290373802185, 0.24560712277889252, 0.11446158587932587, 0.15034140646457672, -0.5764990448951721, -0.04066430404782295, -0.5095230340957642, -0.35005974769592285, 0.7003238797187805, -0.7832004427909851, -0.06598050147294...
listView.setAdapter(adapter); listView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View predictView, int item, long arg3) {
[ -0.023626839742064476, -0.480647474527359, 0.6285298466682434, -0.321184903383255, 0.060146816074848175, 0.38123804330825806, 0.6104040741920471, -0.6146542429924011, -0.1078057512640953, -0.6064891815185547, -0.15244010090827942, 0.7320269346237183, -0.31743505597114563, 0.035275783389806...
final CharSequence[] items = {"Online", "Away", "Do not distrub","Invisible","Offline"}; AlertDialog.Builder builder = new AlertDialog.Builder(SetPrediction.this); builder.setTitle("Change Status");
[ -0.02841363288462162, -0.3738805055618286, 0.6296288967132568, -0.28872159123420715, 0.20700186491012573, 0.18753249943256378, 0.6619487404823303, -0.06096057966351509, 0.11092726141214371, -0.7287817597389221, -0.5296425223350525, 0.3300880193710327, -0.4087704122066498, 0.074732854962348...
builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item)
[ 0.12415143847465515, -0.29776886105537415, 0.21155232191085815, -0.05469663441181183, 0.3603576123714447, 0.16830232739448547, 0.49244919419288635, -0.663971483707428, 0.15950563549995422, -0.888192355632782, -0.19426549971103668, 0.6092900633811951, -0.6401905417442322, 0.1748712956905365...
{ Toast.makeText(getApplicationContext(), items[item], Toast.LENGTH_SHORT).show(); } });
[ -0.004498097114264965, -0.04074304923415184, 0.3166099488735199, -0.4527977406978607, -0.0906023308634758, -0.011024627834558487, 0.5761080384254456, -0.1416846662759781, -0.06050723418593407, -0.7400299310684204, -0.7672216296195984, 0.3750276565551758, -0.24576500058174133, 0.34178879857...
AlertDialog alert = builder.create(); alert.show(); } }); } });
[ 0.3011927008628845, -0.37585577368736267, 0.5459926128387451, -0.6020613312721252, 0.09336666017770767, -0.04649350792169571, 0.6070063710212708, -0.26667502522468567, 0.02489355020225048, -0.6537074446678162, -0.2725345194339752, 0.7494317293167114, -0.8081137537956238, -0.112096764147281...
} public String removeSpaces(String s) { StringTokenizer st = new StringTokenizer(s," ",false); String t=""; while (st.hasMoreElements()) t += st.nextElement(); return t; } ``` The problem is in the `listView.setOnItemClickListener(new OnItemClickListener()` event. That...
[ 0.40185701847076416, -0.13579712808132172, 0.7861559987068176, -0.5397557616233826, 0.20950788259506226, 0.07615063339471817, 0.6100590825080872, -0.5092340707778931, -0.009654078632593155, -0.553435742855072, -0.2739694118499756, 0.652047336101532, -0.5953842401504517, 0.04803821817040443...
alertDialog.setMessage(message); alertDialog.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { alertDialog.dismiss(); } }); alertDialog.show(); } ```
[ 0.2705519497394562, -0.12168063223361969, 0.7586865425109863, -0.5109261870384216, 0.3162233233451843, -0.10133394598960876, 0.45941561460494995, -0.25460734963417053, -0.07910807430744171, -0.5157806873321533, -0.3200085759162903, 0.6205258369445801, -0.7700074315071106, -0.05438146367669...
I have a problem with my INSERT VALUES. The problem is when I try and insert question numbers. Lets say I try to insert 2 questions. Well for first question the question number (QuestionId) should be 1 and for second question it should be 2. But the problem is that both questions display question number 3 when I INSER...
[ 0.07832879573106766, 0.18003402650356293, 0.1532461792230606, -0.2816774249076843, -0.2815231382846832, 0.09103882312774658, 0.48875778913497925, -0.43090373277664185, -0.143405944108963, -0.4255548119544983, 0.14081589877605438, 0.35726216435432434, -0.44788551330566406, 0.107875995337963...
for 2 questions: ``` INSERT INTO Question (QuestionId, QuestionContent) VALUES ('3','what is my name'), ('3','what is my age') ``` The above is incorrect. Below is what it should of echoed: ``` INSERT INTO Question (QuestionId, QuestionContent) VALUES ('1','what is my name'), ('2','what is my age') ``` So what ...
[ 0.009166372939944267, 0.3652087450027466, 0.2748371958732605, -0.04601685330271721, -0.09194236993789673, 0.31958019733428955, 0.18936625123023987, -0.259107381105423, 0.09590284526348114, -0.5912174582481384, -0.24231339991092682, 0.24226747453212738, -0.07313200831413269, -0.040486618876...
When user adds first question it appends question number 1 and the question, when they append their second question it appends question number 2 and the question and etc. ``` <script> function insertQuestion(form) { var $tbody = $('#qandatbl > tbody'); var $tr = $("<tr class='optionAndAnswer' align='...
[ -0.31531891226768494, -0.3120649755001068, 0.6372211575508118, -0.029554050415754318, -0.05066518113017082, 0.33871906995773315, -0.054553333669900894, -0.7262202501296997, -0.02004053443670273, -0.5682944059371948, -0.7419031858444214, 0.7728355526924133, -0.2903391420841217, -0.015577795...
.attr('value',$this.val()) $question.append($questionText); }); $tr.append($qid); $tr.append($question); $tbody.append($tr); } ++qnum; $(".questionNum").text(qnum); $(".num_questions").val(qnum); </script> <form id="QandA" action="insertQuestion.php" method="post" > <tab...
[ -0.37281298637390137, -0.2214137464761734, 0.6227607131004333, -0.03880006819963455, -0.24672797322273254, 0.34853264689445496, 0.13040639460086823, -0.6754753589630127, -0.15876983106136322, -0.35063424706459045, -0.5512956976890564, 0.7951063513755798, -0.34941500425338745, 0.00006216148...
<td rowspan="3"> <textarea class="questionTextArea" rows="5" cols="40" name="questionText"></textarea> </td> </tr> </table> </form> ``` Below is the php code where it INSERT VALUES. ``` $i = 0; $insertquestion = array(); for($i = 0; $i++ ){ $insertquestion[] = "'". mysql_real_escape_string( $_POS...
[ -0.244343563914299, -0.04797406494617462, 0.4778815805912018, -0.24217510223388672, -0.08671008795499802, 0.2405320107936859, 0.5418646931648254, -0.8019313812255859, -0.04653614014387131, -0.1778644174337387, -0.2649938762187958, 0.6952188014984131, -0.36594679951667786, 0.008715162053704...
reference does **not** imply a `const` object. It simply means an object that is **read-only** through that reference. So whether or not an object is `const`, you can have a read-only reference or pointer to it. Now, if what you mentioned were allowed, you could say `refConstPtrB = pointer_to_some_const_B`, and the...
[ 0.29310452938079834, 0.16197170317173004, 0.4983167350292206, 0.09046116471290588, -0.04052971303462982, -0.32387539744377136, 0.10983765870332718, 0.12367792427539825, 0.04331786930561066, -0.27293848991394043, -0.16237221658229828, 0.5060880184173584, -0.47786879539489746, 0.516810953617...
My HTML text is just like this: ``` <p>abcdefghijklmnopqrstuvwxyz</p> ``` What I want is to display a-n using "Times New Roman", and display o-z using "Courier New", and this should be done using CSS, say, with no change to the HTML text. Simply stated, I want CSS to **automatically** choose the specified font corr...
[ 0.16963644325733185, 0.2729760706424713, 0.5454971790313721, -0.2367541640996933, -0.42672982811927795, 0.27585089206695557, 0.17048005759716034, 0.003953682258725166, -0.2797158360481262, -0.9617440700531006, 0.03760553151369095, 0.3138574957847595, -0.36974555253982544, -0.03567385673522...
works in all modern web browsers: <https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face> BTW, more info about this from <http://24ways.org/2011/unicode-range> Live example: <http://jsfiddle.net/jfcox/3LQyr/> ``` <style> @font-face { font-family: Foobar; src: local('Times New Roman'); unicode-range...
[ -0.2158297449350357, 0.22224965691566467, 0.6651906967163086, -0.3899756073951721, -0.15810397267341614, 0.3243723213672638, 0.3615911602973938, -0.1875196099281311, -0.09739216417074203, -0.9207438826560974, -0.27034810185432434, 0.38818633556365967, -0.1856033056974411, 0.065481290221214...
I'm creating a pointer to a pointer to a structure to create a dynamic array with malloc in C, but I get a segmentation fault calling the struct array. Here is a quick rundown of my code: ``` #include <stdio.h> typedef struct { int test1; int test2; }testStruct; int main() { testStruct **neato; ...
[ 0.2427026331424713, -0.12616266310214996, 0.23602981865406036, -0.29523834586143494, 0.10677997767925262, 0.1554880440235138, 0.3497219681739807, -0.39081600308418274, -0.023987123742699623, -0.688187301158905, 0.09748058766126633, 0.4116264879703522, -0.3451884388923645, 0.276557624340057...
// Segmentation fault return 0; } ``` I tried other calls like (\*neato)[0].test1 and all result in segmentation fault. This is obviously not the proper way to do this or my GNU compiler is seriously outdated. You've allocated enough memory for 5 pointers. You have not however initialized the pointers, so th...
[ 0.0031586908735334873, 0.03653564676642418, 0.0830027163028717, -0.23143237829208374, 0.10361013561487198, 0.3404342830181122, 0.2984524369239807, -0.5566507577896118, -0.33609068393707275, -0.6016350388526917, 0.041926309466362, 0.2873460352420807, -0.2297772467136383, 0.07186045497655869...
an array of pointers here. Why not simply allocate enough space for 5 `testStruct`s (i.e., `neato` becomes a `testStruct*`) and pass the address of that pointer to the function that initializes it?
[ 0.30263057351112366, 0.08362365514039993, -0.07558754086494446, 0.1736411601305008, 0.06818263977766037, 0.015627499669790268, 0.20167550444602966, -0.47087833285331726, -0.00207549799233675, -0.4532848000526428, -0.03813697397708893, 0.17134253680706024, -0.2632177174091339, -0.0569309592...
Is it possible to exclude certain commits from being pushed to a service hook on Github? For example, if I only edit the Readme file of a project, it makes no sense to re-test the entire application on Travis. Is there a way I can tell Git that that particular commit should not be sent to the Travis hook? To answer the...
[ 0.7776781320571899, -0.027268916368484497, -0.2362515777349472, 0.1287536919116974, 0.26620563864707947, -0.4150340259075165, 0.13644230365753174, -0.08983705937862396, -0.5963493585586548, -0.3206446170806885, -0.045734502375125885, 0.45959538221359253, -0.12139905244112015, -0.0552431121...
I'm a bit of a NuGet newbie and have come from the Maven world. Recently I've been tasked with updating the third party licence information for our projects. Working with the Maven projects I've been able to use the `license:download-licenses` plugin to get the licence information. What I'm wondering is if there is ...
[ 1.0127235651016235, 0.17596693336963654, 0.041020262986421585, -0.047230951488018036, 0.09930922091007233, -0.15488117933273315, -0.05506080016493797, 0.3122509717941284, -0.07827337831258774, -0.779094934463501, 0.07602036744356155, 0.6160674691200256, 0.13788603246212006, 0.2696818411350...
together the [LegSec command line utility](http://legsec.codeplex.com/). As far as I am aware there is nothing currently available to get the license information directly from the command line as part of a CI build. You would need to create an application to open the .nupkg zip file, extract the license url from the .n...
[ 0.6555200219154358, -0.0916072428226471, 0.1066846251487732, 0.16278032958507538, -0.18736743927001953, -0.2358669489622116, -0.22788658738136292, -0.04147939383983612, -0.4046262502670288, -0.6282237768173218, 0.19941109418869019, 0.25596198439598083, -0.25519123673439026, 0.0831706076860...
need to be extended to get all the projects in the solution which you should be able to do with the Get-Project cmdlet. This would still require someone to run the script to download the licenses. ``` $wc = New-Object System.Net.WebClient Get-Package -ProjectName YourProject | ForEach-Object { $wc.DownloadFile($_....
[ 0.4031263291835785, -0.12265335023403168, 0.7920476794242859, 0.14906513690948486, 0.2573603391647339, -0.6321352124214172, 0.23172056674957275, -0.3031981587409973, -0.11689110100269318, -0.6150270104408264, -0.321503609418869, 0.6834960579872131, -0.23294882476329803, 0.13761502504348755...
I am trying to write my very first python script. This was working but then after some slight refactoring I have, apparently, broken the indentation. I can not determine what is the problem. The interpretor complains about the following method. Can someone point it out? ``` def dataReceived(self, data): a = data.s...
[ 0.32362064719200134, -0.038420237600803375, 0.1338612288236618, -0.39084023237228394, 0.021395618095993996, 0.0957280695438385, 0.3017347753047943, 0.009745484218001366, -0.28399956226348877, -0.24501654505729675, 0.021150736138224602, 0.6907089352607727, -0.4053623080253601, 0.14661107957...
if command == "iam": self.name = content msg = self.name + " has joined" elif command == "msg": msg = self.name + ": " + content print msg ``` > The error reads: File "python\_server.py", line 17 > a = data.split(':') > ^ IndentationError: expected an indente...
[ 0.08621944487094879, 0.055034540593624115, 0.27073755860328674, -0.47068679332733154, 0.09935656189918518, 0.11715269833803177, 0.4200388789176941, -0.11911983788013458, -0.31514114141464233, -0.458841472864151, -0.33277904987335205, 0.4126276671886444, -0.3811533451080322, 0.1703312247991...
using a text editor that allows you to show indents, and you become consistent about using spaces instead of tabs, and you enforce that in your editor.
[ 0.2284155637025833, 0.2325570285320282, 0.34611210227012634, 0.08123129606246948, 0.30051854252815247, -0.2333686500787735, 0.1325324922800064, -0.10679934918880463, -0.2058926522731781, -0.814140796661377, -0.3196287751197815, 0.44657447934150696, -0.1821645051240921, -0.1685820072889328,...
For example, when I use `cursor.execute()` [as documented](https://docs.djangoproject.com/en/dev/topics/db/sql/#executing-custom-sql-directly): ``` >>> from django.db import connection >>> cur = connection.cursor() >>> cur.execute("DROP TABLE %s", ["my_table"]) django.db.utils.DatabaseError: near "?": syntax error ``...
[ 0.16416607797145844, 0.44599780440330505, 0.16118602454662323, -0.11959660798311234, -0.252218633890152, -0.11618426442146301, 0.30565837025642395, -0.26485806703567505, -0.27864015102386475, -0.4054436981678009, -0.036851201206445694, 0.6067744493484497, -0.27865228056907654, 0.1183677539...
you must use dynamic SQL to construct the entire SQL string and send that, unparameterized, to the database (being extra careful to avoid injection if the table name originates outside your code).
[ 0.021815046668052673, -0.18745848536491394, 0.19522054493427277, 0.13320580124855042, 0.020557280629873276, -0.084609754383564, 0.23307235538959503, -0.023226650431752205, -0.2096031755208969, -0.1736121028661728, -0.3739832937717438, 0.36020490527153015, -0.42279866337776184, 0.0573280714...
I have a property that I do not synthesize, instead I create a getter and setter myself. Therefore, the ARC keywords (strong or weak) have no meaning, I assume, so I eliminate them. This works fine on Xcode 4.3, but when my coworker opens them on XCode 4.2 the compiler complains that there is no strong/weak keyword, so...
[ 0.07299385964870453, 0.21006113290786743, 0.19728367030620575, -0.3385053873062134, -0.09425054490566254, -0.11167411506175995, 0.3154045343399048, -0.20206278562545776, 0.15795429050922394, -0.688562273979187, -0.29560306668281555, 0.6937515735626221, -0.6851085424423218, -0.0180817842483...
and do NOT include `@synthesize foo`. Another relevant detail is that there is no corresponding iVar, instead the properties interact with a Core Data object. This will not compile in XCode 4.2 unless I add strong or weak to the keywords. **EDIT** I thought of one more relevant thing, one of these properties is on a ...
[ 0.359200656414032, 0.19177289307117462, 0.1962248980998993, -0.12478137761354446, -0.09156260639429092, -0.337882936000824, 0.19074112176895142, -0.25805261731147766, -0.05673309415578842, -0.45467454195022583, -0.1749502420425415, 0.723319947719574, -0.3880530595779419, -0.021360540762543...
details about the storage > semantics and other behaviors of the property - see “Property Declaration Attributes” for possible values. > > > **Property Declaration Attributes** > > You can decorate a property with > attributes by using the form `@property(attribute [, attribute2, ...])`. > Like methods, proper...
[ 0.3143949806690216, -0.023108799010515213, 0.28188225626945496, 0.29646143317222595, -0.11545945703983307, -0.1208290383219719, 0.0023711570538580418, -0.4241734743118286, -0.4055045545101166, -0.7654187679290771, -0.225721538066864, 0.6775505542755127, 0.029156502336263657, 0.180456727743...
Implementation Directives”), the > code it generates matches the specification given by the keywords. If > you implement the accessor methods yourself, you should ensure that it > matches the specification (for example, if you specify copy you must > make sure that you do copy the input value in the setter method)....
[ 0.21011771261692047, 0.03296597674489021, 0.2817883789539337, 0.06411883980035782, 0.19727931916713715, -0.21033678948879242, 0.10340102016925812, -0.47041988372802734, -0.19756589829921722, -0.7567387223243713, -0.4375472664833069, 0.6945055723190308, -0.46561524271965027, -0.193119496107...
UPDATE: the question i asked doesn't quite cover how deep i went in doing this upgrade! If you stumble on this, i hope the answer i pushed is useful to you So, in an effort to get the "forum" plugin working, i've decided to upgrade cakephp from 1.3 to 2.1 (This was because the forum plugin uses something called CakeD...
[ 0.2952982485294342, -0.1789194643497467, 0.37520143389701843, -0.04998288303613663, -0.39046356081962585, -0.2341659814119339, 0.2911013960838318, -0.09794922173023224, 0.009966941550374031, -0.8565964698791504, -0.11253024637699127, 0.9872570633888245, -0.0017920685932040215, -0.143278419...
the upgrader, and it said it did a bunch of things, and it looks like it *did* do a bunch of things. Now when i visit my site, it is down - no response at all. The error logs in apache read: > [Thu Apr 05 02:58:04 2012] [error] [client 173.45.125.112] PHP Fatal error: Can't find application core file. Please create...
[ 0.11604738235473633, 0.35387885570526123, 0.34628239274024963, 0.065875343978405, 0.058499839156866074, -0.043735116720199585, 0.7241730690002441, -0.1631501019001007, -0.3163987994194031, -0.4720765948295593, -0.305124431848526, 0.5056452751159668, -0.14319494366645813, 0.2185458689928054...
quite what I need - I never touched the index.php file - so i will detail what I am trying here. I am using this site as a guide, but with my own commentary too! <http://www.paulmarshall.us/blog/migrating-from-cakephp-13-to-cakephp-20> (i also found this: <https://github.com/dereuromark/upgrade> which i might have a ...
[ 0.26835185289382935, 0.03511010482907295, 0.5578336119651794, -0.009993648156523705, -0.16198225319385529, -0.1593024879693985, 0.43212321400642395, 0.0023817920591682196, -0.30258020758628845, -0.8124464154243469, -0.14328546822071075, 0.5590705871582031, 0.18474078178405762, 0.0376624390...
and be particular about what i did!) First up, i've noticed that the index.php that my cake was using was not the index.php that came with the cake2.1 code. Unsure why that is the case, but I copied the "new" 2.1 index.php across (yes, this is the app/webroot/index.php file) and now i have a new error: > Notice: Unde...
[ -0.02963922545313835, 0.30974888801574707, 0.42407989501953125, -0.05851797014474869, -0.2682039141654968, 0.14698345959186554, 0.7208951115608215, -0.04837745428085327, -0.32854411005973816, -0.6282570958137512, -0.14933085441589355, 0.4646891951560974, -0.15580172836780548, 0.06655596941...
this now... AND now i see that the upgrade tool didn't upgrade the core.php file - found in app/Config (for 2.1, app/config for 1.3)... what did the upgrade tool really do? I've cut and paste the 2.1 version in (that is, from the zip file of the 2.1 code, i took that /app/Config/core.php and moved it into my /app/Conf...
[ 0.1668574959039688, 0.15813028812408447, 0.12338638305664062, 0.18842825293540955, 0.2336900532245636, -0.09747995436191559, 0.22989952564239502, -0.18396593630313873, -0.31139692664146423, -0.7086593508720398, 0.08117547631263733, 0.7161864042282104, -0.3241277039051056, 0.047478683292865...
ok, so the upgrade to core and database changed the error message... that's good? Still unsure what their much vaunted "upgrade" script did... it just changed file names? Really? > Warning (2): file\_put\_contents(/cake\_install/app/tmp/logs/error.log): failed to open stream: Permission denied [CORE/Cake/Log/Engine/Fi...
[ -0.03657495230436325, 0.19121181964874268, 0.16526900231838226, 0.1290249526500702, 0.32870301604270935, -0.05734030902385712, 0.7384462952613831, -0.3620564341545105, -0.2930493950843811, -0.5360094308853149, -0.2727208733558655, 0.6271132826805115, -0.3281683325767517, 0.1112048998475074...
a new number! (What does the cipher seed do, you ask? Um, well, bing wasn't much help - i read the code. Seems to be used for encrypting/decrypting from cookies? Ok, i can live with that) Bootstrap.php I moved the bootstrap in the zip file to my version (thanks for little, upgrade script!). Haven't made any changes y...
[ 0.047430042177438736, 0.14444488286972046, 0.4868137836456299, 0.04269400238990784, -0.10246216505765915, 0.2595345079898834, 0.7731354236602783, -0.1294977217912674, -0.42511892318725586, -0.6583760976791382, 0.03209935128688812, 0.5792484879493713, -0.28299322724342346, -0.07645899057388...
to do another upgrade. Check this page out: <http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html> Ok, so now I have to make the files - just as they are in that page. The only trick was that, yes, it is in the app folder, and no, my app/View folder that cakePhp made didn't have a "Helper" subfolder... s...
[ 0.17476820945739746, 0.12849299609661102, 0.5840398073196411, -0.034881994128227234, 0.10315263271331787, 0.20956958830356598, 0.35154595971107483, -0.3447183072566986, -0.615199625492096, -0.6955775022506714, -0.13783805072307587, 0.676341712474823, -0.24560047686100006, -0.21532244980335...
on a non-object in /cake\_install/app/pages/top\_menu.html on line 25 Great. Some sort of cool new cake 2 feature that means that i cannot use $html? That seems... oddly appropriate, really. Unbelievable. Now I need to change how $this->data works??? WHY?? WHY?? Why can't this mob work out that apis tend to be fixed ...
[ 0.1801774948835373, -0.09393616765737534, 0.5409395098686218, -0.09692931175231934, -0.26329123973846436, 0.20295566320419312, 0.3266218900680542, 0.018518218770623207, -0.29841333627700806, -0.7282419204711914, 0.09164158254861832, 0.5004368424415588, -0.4697152376174927, 0.22036117315292...
so. This 2.1... it better be seriously awesome... the amount of work everyone has to do to get it up. Is this, i assume, a normal day working with the junior languages? Ah fantastic, the $html problem is caused because somebody didn't like lowercase? One can only wonder: [Undefined var when using Html Helper in CakePH...
[ -0.18260009586811066, -0.18306417763233185, 0.697880208492279, 0.19703444838523865, -0.13640981912612915, -0.38242870569229126, 0.44644927978515625, 0.22393909096717834, -0.28310325741767883, -0.8574173450469971, -0.21511749923229218, 0.48845040798187256, 0.12093500047922134, -0.0953560248...
error: > Controller class PagesController could not be found. Oh for the love of... so i need to move the PagesController found here: lib/Cake/Console/Templates/skel/Controller/PagesController.php and put it here app/Controller/ again, the Cake installer/upgrader seems to be asleep on the job. And now I have H...
[ -0.08022987842559814, 0.07914768904447556, 0.333366721868515, 0.07601828873157501, -0.25809749960899353, 0.07112594693899155, 0.46203798055648804, 0.17258751392364502, -0.35863927006721497, -0.972547173500061, 0.012540462426841259, 0.4024471044540405, -0.29173824191093445, 0.27844342589378...
- javascript ones, anyway - so I never used them. I must have followed a tutorial blindly at some point and added it in... but i don't need it, so out it goes! And now i need to clean up all the ctp files i had, where i used a "require" to ensure that the right html was used. Once more i will use the find command from...
[ 0.31068000197410583, 0.13692499697208405, 0.7834879159927368, -0.2832719385623932, 0.031068045645952225, -0.19533270597457886, 0.2635989487171173, -0.6073974967002869, -0.35749173164367676, -0.6256566643714905, -0.15772391855716705, 0.7189144492149353, -0.16532915830612183, -0.111182406544...
all my cake stuff is. Unsure why this is, but a simple find fixed it: ``` find . -type f -exec sed -i 's/app\/View\/Pages/\/cake_folder\/app\/View\/Pages/g' {} \; ``` (the \ will "depower" a /) Ok, so having done all that and gotten your site to some sort of acceptable level, what next? Well, you might now find som...
[ -0.024944283068180084, 0.09710294008255005, 0.5717273950576782, -0.06399615108966827, -0.2429177612066269, -0.1690080165863037, 0.8307324051856995, 0.04091140255331993, -0.20387059450149536, -0.7082532048225403, -0.33885085582733154, 0.40301668643951416, -0.4089210033416748, 0.287398695945...
ending "i") (what is wrong with the peeps in cakephp??? API means "don't change everything if it will break existing code, ever." not "change! OBAMAAAAA!" ~ next upgrade, i'll push all my code to django or spring or scala. Ruddy nonsense.) The next issue is the "Components" that i am using - i get a cake error saying...
[ 0.24347227811813354, 0.057109225541353226, 0.29831793904304504, -0.135268896818161, -0.07518570125102997, -0.1697016954421997, 0.5511568188667297, -0.07079502195119858, -0.28597888350486755, -0.6938087344169617, -0.33966633677482605, 0.5591101050376892, -0.3513355553150177, 0.2073787152767...
once, use the following line in your app/Config/bootstrap.php file ``` CakePlugin::loadAll(); ``` So... not only is all my code busted, but all the old plugins too? Nice. The solution is to create an app/Plugin folder (yes, the magic upgrader doesn't do that, either) and then look at the plugins you had. Now! This...
[ 0.29739609360694885, 0.11325675994157791, 0.3281817138195038, 0.06084336340427399, -0.037119582295417786, -0.35696059465408325, 0.2343417853116989, -0.15585321187973022, -0.4146873652935028, -0.4809618294239044, -0.2001589834690094, 0.7167695164680481, -0.35970088839530945, 0.0148536041378...
1.3, the plugins were listed like this: > var $components = array('Uploader.Uploader',...); that is, with a dot notation. I can live with that. In my case, I needed to get the latest version of the Uploader plugin (that, thankfully, was upgraded to be 2.x compatible!) and put it in the app/Plugin folder so i got: `...
[ 0.14287203550338745, -0.0928608626127243, 0.49909526109695435, -0.31106582283973694, -0.1413600742816925, 0.10480347275733948, 0.2661641240119934, 0.02106098085641861, -0.31193527579307556, -0.8051058053970337, -0.15712788701057434, 0.8033524751663208, -0.7653706073760986, -0.0205926597118...
other files here too!> ``` That seems to work right now, hooray! The next error was: > Warning (2): Invalid argument supplied for foreach() [CORE/Cake/Utility/Set.php, line 1048] > > > Warning (2): array\_multisort() [<http://php.net/function.array-multisort]>: Argument #1 is expected to be an array or a sort fla...
[ -0.11720899492502213, 0.12612831592559814, 0.287119060754776, -0.18051891028881073, -0.09951677918434143, -0.0533687062561512, 0.540454089641571, -0.22251559793949127, -0.5245438814163208, -0.7599945664405823, -0.21063382923603058, 0.4364071786403656, -0.2850877344608307, 0.074380479753017...
I know what the error is in my code. Good error messaging! Now I see, foolish me, to think that the utility Set::Sort would continue to work if the first array was empty! Truly, the cakephp people are standing, not on the shoulders of giants, but on their very foreheads. It would seem that the new 2.1 upgrade does a...
[ 0.287883460521698, 0.1093577891588211, 0.24642838537693024, -0.25172460079193115, -0.05392088368535042, -0.004533660598099232, 0.3903888463973999, 0.10848528891801834, -0.6190217733383179, -0.33469435572624207, -0.015401147305965424, 0.38814955949783325, -0.24606917798519135, 0.05662931129...
that. Now I am getting FormHelper errors - it looks like $form in the view now becomes $this->Form, so i have another quick script to replace this: > find . -type f -exec sed -i 's/$form/$this->Form/g' {} \; And now the next error I get is: > Fatal error: Unsupported operand types in /cake\_install/lib/Cake/View/H...
[ -0.1180848628282547, 0.20373141765594482, 0.4927988052368164, -0.26754337549209595, 0.12881380319595337, 0.0741414800286293, 0.515366792678833, -0.5137925744056702, -0.1342395693063736, -0.8643494844436646, 0.1047338917851448, 0.5917209982872009, -0.3246529996395111, 0.4325105547904968, ...
now one of my components - actually, the You\_tube\_loader\_component - was broken. I need to modify it so that the header reads: ``` class YouTubeLoaderComponent extends Component { function __construct(ComponentCollection $collection, $settings = array()) { parent::__construct($collection, $settings); ...
[ 0.4212065637111664, -0.14722907543182373, 0.9249963164329529, 0.0910557359457016, 0.09052208065986633, -0.1442548632621765, 0.4885733127593994, -0.2476854920387268, -0.07340269535779953, -0.5746121406555176, 0.058235231786966324, 0.6364008784294128, -0.3809800446033478, 0.34130722284317017...
Illegal offset type [CORE/Cake/Model/Model.php, line 2665] Soooo this is a problem that isn't picked up in cake 1.3, but is in 2.1 The issue is that in the controller action being referenced, there is a "find" call without a type paramter. That is, I had > $results = $this->User->find(array(...), array(...), null, f...
[ 0.289742112159729, -0.1366119384765625, 0.49390509724617004, 0.05016164109110832, 0.2410311996936798, -0.08993236720561981, 0.00826482567936182, -0.523340106010437, -0.4591641426086426, -0.179076686501503, 0.01921110600233078, 0.5600748062133789, -0.582966148853302, -0.07926593720912933, ...
details to the session. I don't know *which* details it stores to the session, or how to modify them - looking into that! - but my code wasn't saving the "id" value, so the check above always set the loggedIn value to false. To remedy, I modified the call to read: > $this->set('loggedIn', $this->Auth->loggedIn()); ...
[ 0.3251204490661621, -0.047723330557346344, 0.3797534704208374, -0.003605828620493412, -0.12623904645442963, 0.08908593654632568, 0.5272895693778992, 0.13478058576583862, -0.11763323098421097, -0.6191247701644897, 0.09731487929821014, 0.6776704788208008, 0.020783623680472374, 0.156612977385...
help clear up some confusion. To be honest, the only thing I'm confused about is who was so confused about the fact that the auth component had all the user's details available after logging in. But fear not, they've cleared the confusion up and... removed the feature entirely. So, what are you to do? The link above s...
[ 0.3674648404121399, 0.18375475704669952, 0.20237016677856445, 0.23257532715797424, 0.14000709354877472, -0.21980860829353333, 0.3676060438156128, 0.08107392489910126, -0.27355802059173584, -0.5251346826553345, 0.0003641318471636623, 0.538098156452179, 0.14547784626483917, 0.158269405364990...
instead of the oh-so-confusing: ``` if ($this->Auth->login($this->request->data)) { ... //argh! I am so confused by that line above!!!1 ``` i now have: ``` $user = $this->User->find('first', array( 'conditions' => array('User.email' => $this->request->data['User']['email']) ) ); // Use the AuthCompone...
[ -0.1502387523651123, 0.04906674101948738, 0.474279522895813, -0.00824890285730362, 0.06064274534583092, -0.2288341373205185, 0.36701804399490356, -0.42277470231056213, -0.2447620928287506, -0.7237968444824219, -0.3198963701725006, 0.6481879353523254, -0.2769397795200348, 0.1373606771230697...
not found in cakePHP](https://stackoverflow.com/questions/10184388/authorization-adapter-was-not-found-in-cakephp) And that was it! There might be other issues - god speed on them - but i didn't come across them, so i cannot help you any more.
[ -0.0869092121720314, -0.06573431938886642, 0.36972466111183167, 0.16908128559589386, 0.06994953006505966, -0.1579744517803192, 0.3029089868068695, 0.19853653013706207, -0.3913571238517761, -0.31966400146484375, -0.03953918069601059, 0.24707946181297302, -0.16708223521709442, -0.05726116895...
"One should always use **[std::string](http://www.cplusplus.com/reference/string/string/)** over c-style strings(`char *`)" is advice that comes up for almost every source code posted here. While the advice is no doubt good, the actual questions being addressed do not permit to elaborate on the **why?** aspect of the a...
[ 0.4706645607948303, 0.2591772675514221, -0.057242777198553085, -0.03338286280632019, 0.10618413239717484, -0.21462172269821167, 0.11922522634267807, 0.08785548061132431, -0.05215656757354736, -0.30049800872802734, -0.1956942230463028, 0.555375337600708, -0.17425918579101562, -0.01228689961...
mentioned in `#1` is a good practice? 1. std::string manages its own memory, so you can copy, create, destroy them easily. 2. You can't use your own buffer as a std::string. 3. You need to pass a c string / buffer to something that expects to take ownership of the buffer - such as a 3rd party C library.
[ 0.3631560504436493, 0.0835050716996193, 0.00940006785094738, 0.11168748140335083, -0.02523982897400856, -0.4998084604740143, 0.11527039110660553, -0.13389691710472107, -0.27041202783584595, -0.40595942735671997, -0.07482495158910751, 0.254984050989151, -0.39208707213401794, 0.0447255373001...
Is there a way to INSERT multiple records rather than one at a time? I have a very very ugly rake task that is doing the following ... ``` VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2000-03-07", :party => row[45], :participate => participated(row[45])...
[ 0.3257351219654083, 0.2826555669307709, -0.053997624665498734, 0.6008166074752808, -0.05983875319361687, 0.09066572040319443, 0.10288456827402115, -0.28827616572380066, -0.24404276907444, -0.6423459649085999, 0.636440634727478, 0.24332405626773834, 0.036706507205963135, 0.03471872583031654...
row[47], :participate => participated(row[47])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "GE", :election => "2001-11-06", :party => row[48], :participate => participated(row[48])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ 0.009197672829031944, 0.2532682418823242, 0.03702423721551895, 0.3962337374687195, -0.2163531333208084, 0.22461381554603577, -0.07851967215538025, -0.3412346839904785, -0.2301262617111206, -0.6119593381881714, 0.18130387365818024, 0.3312729001045227, -0.10052403807640076, -0.28772306442260...
row[51], :participate => participated(row[51])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "GE", :election => "2003-11-04", :party => row[52], :participate => participated(row[52])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ -0.058334264904260635, 0.17679838836193085, 0.059128422290086746, 0.2943163216114044, -0.300528883934021, 0.24929824471473694, -0.14125210046768188, -0.4965932369232178, -0.2065247744321823, -0.6106345653533936, 0.06423188000917435, 0.20617686212062836, -0.09545308351516724, -0.39446419477...
row[55], :participate => participated(row[55])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2005-05-03", :party => row[56], :participate => participated(row[56])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ 0.02920074574649334, 0.09468834847211838, 0.165225550532341, 0.3269916772842407, -0.209920734167099, 0.2826233506202698, -0.1359184980392456, -0.3660765290260315, -0.17756253480911255, -0.5817008018493652, 0.18595151603221893, 0.14308542013168335, -0.022320806980133057, -0.2679842412471771...
row[59], :participate => participated(row[59])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2006-05-02", :party => row[60], :participate => participated(row[60])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "GE...
[ -0.09281762689352036, 0.1177179217338562, -0.06279420107603073, 0.29915425181388855, -0.15275569260120392, 0.37898945808410645, -0.26956379413604736, -0.3019781708717346, -0.008634869009256363, -0.7334742546081543, 0.13773030042648315, 0.36552542448043823, -0.043313685804605484, -0.2115626...
row[63], :participate => participated(row[63])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "GE", :election => "2007-11-06", :party => row[64], :participate => participated(row[64])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ -0.08296384662389755, 0.24963101744651794, -0.0867985337972641, 0.28430798649787903, -0.14032351970672607, 0.344648540019989, -0.2001679241657257, -0.28789222240448, -0.02237684838473797, -0.7327547669410706, 0.1778717339038849, 0.3365458548069, -0.03654995560646057, -0.18021155893802643, ...
row[67], :participate => participated(row[67])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2008-10-14", :party => row[68], :participate => participated(row[68])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "GE...
[ -0.021397393196821213, 0.3086254894733429, 0.0019887895323336124, 0.39375442266464233, -0.06588540971279144, 0.2785261571407318, -0.1837064027786255, -0.2331622689962387, -0.06821278482675552, -0.7365788817405701, 0.15188464522361755, 0.2503295838832855, -0.05596030503511429, -0.1908714026...
row[71], :participate => participated(row[71])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2009-09-08", :party => row[72], :participate => participated(row[72])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ 0.018198154866695404, 0.24398310482501984, 0.058076996356248856, 0.31709733605384827, -0.06713216751813889, 0.22490257024765015, -0.132926806807518, -0.1259743869304657, -0.14252345263957977, -0.8021955490112305, 0.0865725427865982, 0.33781564235687256, -0.12223103642463684, -0.19376024603...
row[75], :participate => participated(row[75])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2010-05-04", :party => row[76], :participate => participated(row[76])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ 0.11047059297561646, 0.2920483648777008, -0.10923577845096588, 0.29555320739746094, -0.16800345480442047, 0.1969565600156784, -0.13758105039596558, -0.20473460853099823, -0.017191380262374878, -0.7378526926040649, 0.06265730410814285, 0.30940836668014526, -0.0842510387301445, -0.2943727374...
row[79], :participate => participated(row[79])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2011-05-03", :party => row[80], :participate => participated(row[80])) VoteRecord.create(:prospect_id => prospect.id, :state => "OH", :election_type => "PR...
[ 0.08766771107912064, 0.1948034167289734, 0.06804827600717545, 0.19472718238830566, -0.09662829339504242, 0.100316621363163, -0.05882991477847099, -0.4357442259788513, -0.10146988928318024, -0.6845291256904602, 0.10544485598802567, 0.42598098516464233, -0.12185338139533997, -0.1298268586397...
[ { :prospect_id => prospect.id, :state => "OH", :election_type => "GE", :election => "2011-11-08", :party => row[82], :participate => participated(row[82]) }, { :prospect_id => prospect.id, :state => "OH", :election_type => "PR", :election => "2011-09-13", :party => row[81], :participate => participated(row[81...
[ -0.05769827961921692, -0.014472112990915775, 0.21321414411067963, 0.13525958359241486, -0.10172409564256668, 0.2419593334197998, -0.08684852719306946, -0.5552036166191101, -0.3118596374988556, -0.5721551179885864, 0.18766003847122192, 0.5277141332626343, -0.10635346174240112, -0.1147909909...
INSERT statements with multiple VALUES lists to insert several > rows at a time. This is considerably faster (many times faster in some > cases) than using separate single-row INSERT statements. If you are > adding data to a nonempty table, you can tune the > bulk\_insert\_buffer\_size variable to make data inserti...
[ 0.3065517544746399, -0.25947824120521545, 0.1916213482618332, 0.048593342304229736, -0.05755958333611488, -0.08053214848041534, 0.16765405237674713, -0.2776234745979309, -0.21620871126651764, -0.5238240957260132, -0.18516618013381958, 0.7518914937973022, -0.3963688910007477, -0.07299324870...
This is it possible to implement this? I have File foo[] that has a list of 5 files. But I only want to copy foo[0] and foo[3] into File bar[] so that bar[] will only have 2 elements. My code gets the length of foo[], then if the index of the selected file equals the index for i, add foo[i] to bar[i]. This is the pos...
[ 0.09332522749900818, 0.0834873616695404, 0.6672283411026001, -0.1573396772146225, 0.12153337895870209, 0.04857829585671425, 0.15080568194389343, -0.7408115863800049, -0.30182021856307983, -0.4750295579433441, -0.012342086993157864, 0.3875565826892853, -0.46334680914878845, 0.14337559044361...
files from the JList.\*** The reason being is that I have a list of files that are selectable in a JList. And from that list, I want the user to be able to select which files to attach to an email. Disclaimer: *Although this had worked perfectly fine for me before, **you should be aware of the classic pitfalls of depen...
[ 0.907001793384552, -0.030082596465945244, 0.2813570499420166, -0.16157817840576172, 0.12098892033100128, -0.16095153987407684, 0.10423967987298965, 0.03908493369817734, -0.2998180091381073, -0.3549516201019287, -0.11620734632015228, 0.6852761507034302, -0.16865375638008118, -0.069973662495...
only historical, in my opinion.* --- Sorry about that question, I think it was the hour. To solve that problem, I implemented [this solution](https://stackoverflow.com/a/9744146/489607) as is. Seems to work just fine. So, I believe it was just a matter of finding the (currently attached) fragment instance by figurin...
[ 0.26138463616371155, 0.14262749254703522, 0.02394835837185383, 0.42289167642593384, -0.006667914800345898, -0.04762575402855873, 0.054005734622478485, 0.19673770666122437, -0.3994101881980896, -0.633687436580658, 0.014133511111140251, 0.20408444106578827, 0.10795670747756958, 0.31512612104...
BTW... but without a real example to work on sometimes people like me get lost. Anyway, here is the last piece of code that I needed (the commented part above): ``` int n = 0; mViewPager.setCurrentItem(n); // in the question I had stopped here. ExcerptsFragment f = (ExcerptsFragment) ContainerActivity.this ....
[ 0.13387538492679596, 0.14737138152122498, 0.555073082447052, 0.03682781755924225, 0.1956987828016281, 0.06435170024633408, 0.5514271259307861, -0.4180811643600464, -0.2514343559741974, -0.5754055380821228, -0.09777268022298813, 0.34844687581062317, -0.24791090190410614, 0.2147265523672104,...