text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the more *general* case, of when I'm getting an integer that's never *supposed* to be negative, but which *could* theoretically be, due to bugs. Heck, I might be *writing* a method that does this, in order to override another piece of code -- so I can't change the signature. And my code could certainly have bugs, even...
[ 0.265375018119812, 0.10017593950033188, 0.18214142322540283, 0.021780941635370255, -0.308758020401001, -0.08554388582706451, 0.37139901518821716, -0.24571016430854797, -0.4474576413631439, -0.554617702960968, 0.07982408255338669, 0.5443981885910034, -0.11446324735879898, 0.142606720328331,...
of your solutions are identical. `std::string::size_type` is always `std::size_t`, and while I would use a `static_cast`, the C-style cast performs the same cast, in this case. Because you know that the returned length is never negative (ensure this, by the way; you never know what weird things people might do), you're...
[ 0.054355163127183914, 0.14459440112113953, 0.4162566661834717, -0.20068523287773132, -0.07142168283462524, 0.01600770652294159, 0.34155258536338806, -0.20659950375556946, -0.3350294828414917, -0.4472712278366089, -0.0061388215981423855, 0.6340259313583374, -0.4536246657371521, 0.1828733831...
throw an exception (depending on your domain, this may be too costly), or use `assert`. Generally, though, you should trust the documentation.
[ 0.6023389101028442, 0.3114461302757263, -0.32388389110565186, 0.22294394671916962, -0.12444168329238892, -0.8290987014770508, 0.33553025126457214, -0.12308319658041, 0.04826633632183075, -0.35709914565086365, -0.27462026476860046, 0.7983107566833496, 0.06585456430912018, -0.102623663842678...
I have an email from a developer in which he says: > As you may know 1110000000000000 means 1+2+4 I won't be able to contact him for a few days. Can anyone else explain how that is possible? Numbers appear to be turned into binary using the following function: ``` function toBinaryString(bitmask) tvar2 = 0 tvar3 = ...
[ 0.1406397521495819, 0.1470976322889328, 0.2647572457790375, -0.15667468309402466, -0.08838814496994019, 0.2844216227531433, 0.24393029510974884, -0.3618234395980835, -0.23630593717098236, -0.08842616528272629, -0.13846853375434875, 0.544808030128479, -0.4619843065738678, -0.021005986258387...
if tvar3 = tvar3 * 2 tvar2 = tvar2 + 1 loop toBinaryString = tvar1 end function ``` It's little endian notation ([Wiki](http://en.wikipedia.org/wiki/Endianness)). Basicaly the least significant bits appear on the left, unlike big endian notation (which is what most people think of when talking about binary). ...
[ -0.31573906540870667, -0.1578359603881836, 0.39855414628982544, -0.389538437128067, -0.1905723661184311, -0.008591677062213421, 0.3467422127723694, -0.45380380749702454, 0.11818841844797134, -0.12289461493492126, -0.4638501703739166, 0.2595384418964386, -0.2737117409706116, -0.097649730741...
I have a UI kit something like the on [this link](http://graphicriver.net/item/styllus-ui-kit-10/1865716). And I would like to assign same Style to HTML form elements like radio buttons, selectbox, checkbox, textbox, textarea and others. What is the best way to apply styles to these Form elements so that they can look...
[ 0.3714328110218048, -0.20572412014007568, 0.47003042697906494, 0.26135215163230896, -0.36895444989204407, -0.3994715213775635, 0.08808974176645279, -0.1642829030752182, -0.18637675046920776, -0.8016560673713684, 0.1409587413072586, 0.55856853723526, 0.06929537653923035, -0.0452028736472129...
I was wondering if I can override the action of the back and home button is some cases. Normally these buttons should just react like they always do, but in a case some setting is true I want to override the buttons and let them call my own methods. I´m using these two methods to override these buttons: ``` @Overri...
[ 0.2400701940059662, 0.03687172010540962, 0.520645797252655, -0.2221919447183609, 0.27710768580436707, 0.2686273753643036, 0.27203625440597534, -0.4317445456981659, -0.17154929041862488, -0.3826242685317993, 0.043178871273994446, 0.9323290586471558, -0.3247401714324951, 0.21668261289596558,...
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); super.onAttachedToWindow(); // call my homebutton pressed method when boolean==true } ``` > I
[ -0.0035695440601557493, 0.00803969707340002, 0.7183579206466675, -0.537112832069397, 0.29664286971092224, 0.3570963740348816, 0.6045418977737427, -0.23789073526859283, -0.11198379844427109, -0.7890490889549255, -0.2925524413585663, 0.6964333653450012, -0.20199167728424072, 0.35866236686706...
was wondering if I can override the action of the back and home button is some cases. Yes you can do override `Home` button. I have developed an application which disable hard button, you can have a look. I have taken a **toggle button** which locks all hard button to work except **Power** button ``` public class Di...
[ 0.5670913457870483, -0.5537542104721069, 0.5344420075416565, -0.03679777681827545, 0.31559237837791443, -0.23793187737464905, 0.5150927901268005, -0.30653029680252075, -0.15073156356811523, -0.5549362897872925, -0.4043128192424774, 0.916694164276123, -0.5281354188919067, -0.147607162594795...
super.onCreate(savedInstanceState); setContentView(R.layout.main); mTextView=(TextView) findViewById(R.id.tvInfo); mToggleButton=(ToggleButton) findViewById(R.id.btnLock); mToggleButton.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onC...
[ -0.07131654024124146, -0.4894401729106903, 0.9218413829803467, -0.15745976567268372, 0.21414875984191895, 0.16752631962299347, 0.877229630947113, -0.7101465463638306, -0.26412102580070496, -0.46404972672462463, -0.25056251883506775, 0.7370322942733765, -0.3449372351169586, 0.26190313696861...
onAttachedToWindow(); } }); } @Override public boolean dispatchKeyEvent(KeyEvent event) { if ( (event.getKeyCode() == KeyEvent.KEYCODE_HOME) && isLock) { mTextView.setText("KEYCODE_HOME"); return true; } else return super.dispatchKeyEvent(e...
[ -0.2670689821243286, -0.3650304079055786, 0.4885365664958954, -0.19208280742168427, 0.2689603567123413, -0.03352150693535805, 0.5293425917625427, -0.25103089213371277, -0.0877661406993866, -0.48870059847831726, -0.5108950138092041, 0.8808478713035583, -0.23733632266521454, 0.15450178086757...
public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if( (keyCode==KeyEvent.KEYCODE_BACK) && isLock) { mTextView.setText("KEYCODE_BACK"); return true; } else return super.onKeyDown(keyCode, event);
[ -0.08196782320737839, -0.3794631361961365, 0.225450336933136, -0.3009345829486847, 0.09174421429634094, -0.21258889138698578, 0.6243677139282227, -0.42898979783058167, 0.25421348214149475, -0.13148225843906403, -0.5264104604721069, 0.782057523727417, -0.4438066780567169, 0.0727927014231681...
} @Override public void onAttachedToWindow() { System.out.println("Onactivity attached :"+isLock); if(isLock) { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); super.onAttachedToWindow(); } else {
[ 0.021461745724081993, -0.33072128891944885, 0.6028177738189697, -0.16127146780490875, 0.3252078890800476, -0.017827726900577545, 0.5556398034095764, -0.2944578528404236, -0.15823054313659668, -0.6070452928543091, -0.35326114296913147, 0.6997395753860474, -0.46655458211898804, 0.41669061779...
this.getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION); super.onAttachedToWindow(); } } } ``` main.xml ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:lay...
[ 0.05658616125583649, -0.3307253122329712, 1.0023843050003052, -0.2871074676513672, 0.04471052810549736, 0.2421082705259323, 0.054216425865888596, -0.19991961121559143, -0.24813520908355713, -0.7946698069572449, -0.27695155143737793, 0.5166568160057068, -0.3499854803085327, 0.19812719523906...
android:id="@+id/btnLock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textOff="UnLocked" android:textOn="Locked" /> </LinearLayout> ```
[ -0.40358996391296387, -0.07041710615158081, 0.5889093279838562, -0.19963891804218292, 0.11202378571033478, 0.2052394598722458, 0.10970882326364517, -0.2686465382575989, -0.17183344066143036, -0.445834755897522, -0.31120893359184265, 0.37820205092430115, -0.15000909566879272, 0.107613600790...
I have a Facebook like that links to a page on witch I don't have complete control: I can modify the `<body>` but not the `<head>` of the page... So I tried to set the link of the like button on a new page on which I have complete control, set the opengraph metatags on this page, and set an og:url that links to the ori...
[ 0.5172264575958252, 0.2962180972099304, 0.44690608978271484, 0.12862156331539154, -0.3224620521068573, -0.17058824002742767, 0.2901742458343506, -0.14751634001731873, -0.2927330732345581, -0.22370977699756622, 0.34514179825782776, 0.22676227986812592, -0.31154006719589233, 0.22409288585186...
url and not from the og:url ? There is no way to instruct linter to extract OpenGraph metadata from page which have URL different than one defined in `og:url`. Linter will always extract the meta tags from URL defined in `og:url` at the end of the chain... There is a way to do something other (which may, or may not f...
[ 0.0034515210427343845, 0.320036381483078, 0.4495558738708496, 0.4063781499862671, 0.008362687192857265, -0.013888617977499962, -0.010334490798413754, -0.5601233839988708, -0.03553668409585953, -0.5741482973098755, -0.10688090324401855, 0.5307615399360657, -0.3816303312778473, -0.2453928142...
user who land this intermediate page will be redirected to the correct final page. Beware, this will associate all the likes not to the "final" page but to the intermediate one.
[ 0.016255874186754227, -0.18880541622638702, 1.026774287223816, 0.03253206983208656, 0.07733028382062912, 0.17040075361728668, 0.3466252386569977, 0.10022983700037003, 0.03781461343169212, -0.7586021423339844, -0.18804022669792175, 0.3755107820034027, -0.11977557837963104, 0.097651652991771...
I'm trying to create an instant messenger in java using the SMACK API. My ultimate goal is to provide voice as well as video chat using a google(gmail) id. The API doesn't matter. Just something that works. I have googled a lot, but could not find any good documentation. I found a library called libjingle, but it sup...
[ 0.4310990273952484, 0.13364678621292114, 0.39780908823013306, 0.10661681741476059, -0.23845979571342468, -0.21656623482704163, 0.11679479479789734, 0.10672177374362946, 0.06390049308538437, -0.6480371952056885, 0.30170753598213196, 0.5153293013572693, -0.4472227394580841, -0.12532651424407...
`og:url`. Linter will always extract the meta tags from URL defined in `og:url` at the end of the chain... There is a way to do something other (which may, or may not fit your needs): You can create intermediate page that will have all the required OpenGraph including `og:url` pointing to that page (not the one you ...
[ 0.07133710384368896, 0.24021698534488678, 0.6085291504859924, 0.2324463129043579, -0.15171284973621368, 0.0474977120757103, -0.031201938167214394, -0.3033424913883209, -0.1719484031200409, -0.5756962895393372, -0.08019401133060455, 0.7067294120788574, -0.2606956362724304, -0.11073767393827...
the intermediate one.
[ -0.37928640842437744, -0.2667221426963806, -0.141523078083992, -0.029367415234446526, -0.3607264757156372, 0.06682146340608597, -0.1625743806362152, 0.18318378925323486, 0.13056126236915588, -0.44647273421287537, -0.14036811888217926, 0.5468710660934448, -0.13298076391220093, -0.1873957961...
I have a problem in my coding which was working fine with an older version of Firefox. When I updated to Firefox 3.6 my vertical menu's first list is bigger than the other list. Here is my CSS code; ``` #verti { float:bottom; width:300px; margin-top:50px; position:relative; } #verti ul li { position:relative; lis...
[ -0.3876015841960907, 0.0661909282207489, 0.9557145237922668, -0.35492122173309326, -0.038133807480335236, 0.40079835057258606, 0.2750096619129181, -0.3860791325569153, -0.18964116275310516, -0.8388324975967407, -0.18927942216396332, 0.49174410104751587, -0.28466978669166565, -0.13783080875...
I have created an sample application of calculator for sum of two numbers using webservices in Java by using Jersey service. My code is : Calculator.java ``` package p1; import javax.jws.WebService; import javax.jws.WebMethod; import javax.ws.rs.Path; @WebService @Path("/CalculatorService") public class Calculator ...
[ 0.1328486204147339, 0.23026752471923828, 0.5337870121002197, -0.0701509565114975, -0.030520185828208923, 0.6090038418769836, -0.020314881578087807, -0.663015604019165, -0.017261285334825516, -0.8938763737678528, 0.2982022762298584, 0.6338952779769897, -0.3331011235713959, -0.09120295941829...
* * @param arg1 * @param arg0 * @return * returns java.lang.String */ @WebMethod @WebResult(targetNamespace = "") @RequestWrapper(localName = "sum", targetNamespace = "http://p1/", className = "mypack.Sum") @ResponseWrapper(localName = "sumResponse", targetNamespace = "http...
[ -0.1772131770849228, -0.08040369302034378, 0.5418884754180908, -0.3391304314136505, -0.4959987699985504, 0.608790397644043, 0.4552564024925232, -0.8664705753326416, -0.3795998692512512, -0.5468584299087524, -0.20821242034435272, 0.312821626663208, -0.35894036293029785, -0.05656655877828598...
int arg0, @WebParam(name = "arg1", targetNamespace = "") int arg1); } ``` CalculatorService.java: ``` package mypack; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebSe...
[ -0.04153238981962204, 0.25302258133888245, 0.9083169102668762, -0.14130210876464844, 0.1368401050567627, 0.26991674304008484, 0.03457198664546013, -0.5025109052658081, -0.1475256383419037, -0.46859127283096313, -0.40865111351013184, 0.6798281669616699, -0.3251934349536896, 0.21588923037052...
try { url = new URL("http://localhost:8081/MyCalculatorWs/CalculatorService?WSDL"); } catch (MalformedURLException e) { e.printStackTrace(); } CALCULATORSERVICE_WSDL_LOCATION = url; } public CalculatorService(URL wsdlLocation, QName serviceName) { super(w...
[ 0.08730409294366837, -0.05092791095376015, 0.786440908908844, -0.07756491750478745, 0.4330841600894928, 0.16395573318004608, 0.37293973565101624, -0.13779257237911224, -0.18559467792510986, -0.6261476278305054, -0.6080273985862732, 0.6835535168647766, -0.2489336133003235, 0.431032180786132...
QName("http://p1/", "CalculatorService")); } /** * * @return * returns Calculator */ @WebEndpoint(name = "CalculatorPort") public Calculator getCalculatorPort() { return (Calculator)super.getPort(new QName("http://p1/", "CalculatorPort"), Calculator.class); } } ``...
[ -0.002998332493007183, 0.2655489146709442, 0.7123661637306213, -0.03499239683151245, -0.05342818796634674, 0.4421994090080261, 0.11166448891162872, -0.4686450660228729, 0.284355103969574, -0.7736905217170715, -0.14229027926921844, 0.7483285665512085, -0.3252456486225128, -0.001744134933687...
allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory metho...
[ 0.03881358355283737, -0.11895916610956192, 0.41707590222358704, -0.028264319524168968, -0.21773402392864227, 0.38145655393600464, 0.1214759573340416, -0.5845118165016174, -0.1734876185655594, -0.6761631965637207, -0.07659903913736343, 0.35554033517837524, -0.32633060216903687, 0.1965259611...
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mypack * */ public ObjectFactory() { } /** * Create an instance of {@link Sum } * */ public Sum createSum() { return new Sum(); } /**
[ 0.2005980908870697, -0.18088822066783905, 0.41350099444389343, -0.05971809849143028, -0.2941570580005646, 0.2071271389722824, 0.5710987448692322, -0.425392210483551, -0.100248321890831, -0.9508097767829895, 0.10302595049142838, 0.1740642637014389, -0.5765870809555054, 0.2713643014431, 0....
* Create an instance of {@link SumResponse } * */ public SumResponse createSumResponse() { return new SumResponse(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link Sum }{@code >}} * */ @XmlElementDecl(namespace = "http://p1/", name = "sum") publ...
[ -0.1722983717918396, -0.23344093561172485, 0.6230809092521667, -0.19612012803554535, -0.1475270837545395, 0.24061435461044312, 0.07988760620355606, -0.6947728395462036, -0.07465175539255142, -0.6012396216392517, -0.1554867923259735, 0.1256597936153412, -0.24054555594921112, 0.4242398142814...
null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link SumResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://p1/", name = "sumResponse") public JAXBElement<SumResponse> createSumResponse(SumResponse value) { return new JAXBElement<SumResponse>...
[ -0.17739728093147278, -0.22247204184532166, 0.6426108479499817, -0.16022591292858124, -0.14463455975055695, 0.3676524758338928, 0.09845484048128128, -0.7597056031227112, 0.05911564454436302, -0.47313687205314636, -0.40548014640808105, 0.319266140460968, -0.2967986762523651, 0.1314787268638...
* * <pre> * &lt;complexType name="sum"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="arg1" type="{http://www.w3.org/2001/XMLSchema...
[ -0.08234481513500214, -0.2606307864189148, 0.3402502238750458, -0.46164965629577637, -0.23368605971336365, -0.0030044508166611195, 0.32260510325431824, -0.8073115944862366, -0.05509210750460625, -0.3873177766799927, -0.3600960671901703, 0.45456305146217346, -0.687881588935852, 0.0852679833...
protected int arg1; /** * Gets the value of the arg0 property. * */ public int getArg0() { return arg0; } /** * Sets the value of the arg0 property. * */ public void setArg0(int value) { this.arg0 = value;
[ -0.11539401113986969, -0.19900450110435486, 0.3743835687637329, -0.45565497875213623, 0.2834542989730835, -0.13591928780078888, 0.5929619073867798, -0.46291571855545044, -0.16220463812351227, -0.4362909197807312, -0.48444631695747375, 0.7677767872810364, -0.6157477498054504, -0.03732356429...
} /** * Gets the value of the arg1 property. * */ public int getArg1() { return arg1; } /** * Sets the value of the arg1 property. * */ public void setArg1(int value) { this.arg1 = value; } } ``` SumResponse.java: ``` package mypack; import ...
[ -0.09975593537092209, -0.0704302117228508, 0.32522839307785034, -0.39801016449928284, -0.16171102225780487, 0.03727727755904198, 0.4440782070159912, -0.5686272978782654, -0.24365311861038208, -0.565188467502594, -0.4593612849712372, 0.5595293641090393, -0.8080824017524719, -0.1667919307947...
javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for sumResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="sumResponse"> * &lt;complexContent> * &lt;...
[ -0.4443322718143463, -0.23513182997703552, 0.47110238671302795, -0.2611300051212311, -0.0645914301276207, 0.10491330921649933, 0.2577388882637024, -0.6347270011901855, 0.028223935514688492, -0.5804603099822998, -0.21512570977210999, 0.3847869634628296, -0.5025057792663574, -0.1359256803989...
SumResponse { @XmlElement(name = "return") protected String _return; /** * Gets the value of the return property. * * @return * possible object is * {@link String } * */ public String getReturn() { return _return;
[ 0.25396639108657837, -0.30109062790870667, 0.6709876656532288, -0.07790541648864746, 0.02539859525859356, 0.011837014928460121, 0.23737405240535736, -0.5286638140678406, 0.04821956157684326, -0.40841618180274963, -0.4491257071495056, 0.5607369542121887, -0.3692687749862671, 0.3110281527042...
} /** * Sets the value of the return property. * * @param value * allowed object is * {@link String } * */ public void setReturn(String value) { this._return = value; } } ``` And my web.xml file is: ``` <?xml version="1.0" encoding="UTF-8"?> <web...
[ 0.034475166350603104, 0.435874879360199, 0.653654932975769, -0.2573836147785187, 0.018779749050736427, 0.04765501618385315, 0.1201624870300293, -0.5059671998023987, -0.24836531281471252, -0.6369345188140869, -0.3007964789867401, 0.5990508794784546, -0.20020510256290436, 0.09324996173381805...
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>CalculatorEx</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</wel...
[ -0.2497108429670334, 0.027153797447681427, 0.3501887619495392, -0.2913685142993927, -0.33932220935821533, 0.22348973155021667, 0.14154331386089325, -0.3804013133049011, -0.40412211418151855, -0.6236253976821899, -0.3900161683559418, -0.0898105576634407, -0.3453575670719147, -0.253520637750...
REST Service threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) org.apache.catalina.connector.CoyoteA...
[ -0.28215402364730835, -0.059352900832891464, 0.2150108963251114, -0.09643030911684036, -0.29767024517059326, 0.3456743657588959, 0.4866560995578766, -0.12398357689380646, -0.19266442954540253, -0.3680148124694824, -0.13096924126148224, 0.46124565601348877, -0.3590804636478424, 0.2786701917...
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) javax.servlet.GenericServlet.init(GenericServlet.java:160)...
[ -0.0666620135307312, 0.22212029993534088, 0.2818673849105835, 0.10411962121725082, -0.09516449272632599, 0.2320028841495514, 0.3831654191017151, -0.10707283765077591, -0.3229958713054657, -0.5866477489471436, -0.11066983640193939, 0.6161288619041443, -0.1749209761619568, -0.100142121315002...
This example works fine (without parameters): [JSONP sample on twitter](https://stackoverflow.com/questions/2681466/jsonp-with-jquery) ``` <html><head><title>Twitter 2.0</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head><body> <div id='twee...
[ 0.18994265794754028, -0.04920921474695206, 0.47228845953941345, -0.10697019100189209, -0.04981591925024986, -0.2942529320716858, 0.4055161774158478, -0.4166862964630127, -0.2030591070652008, -0.6454522013664246, -0.06592157483100891, 0.5765489339828491, -0.3761349618434906, -0.252895265817...
url returns json data when paste on url bar: ``` {"SessionID":"44e6f809-3b40-43fc-b425-069e9c52cbda","SourceIP":"1","UserID":313} ``` But I can't make it work with JSONP. Any idea about this? To enable jsonp (causes cross-domain access), this should be put inside web.config file ``` <bindings> <webHttpBinding...
[ -0.28771620988845825, 0.17291821539402008, 0.8605403304100037, -0.01364556048065424, -0.3809879720211029, -0.16367416083812714, 0.19684934616088867, -0.08601469546556473, -0.04131471738219261, -0.7517384886741638, -0.3286374807357788, 0.3058416247367859, -0.16216200590133667, 0.32545462250...
I would like to copy whole directory to another directory. xcopy and My.Computer.FileSystem.CopyDirectory only copies the "Content" of the directory. For example: If source: C:\Users\Myfile555\ and Destination: C:\Dest\ I would want the files to be copied to C:\Dest\Myfile555 On my Visual Studio Application, I made ...
[ 0.4002473056316376, 0.30021166801452637, 0.40913698077201843, 0.06139198690652847, 0.06963153928518295, -0.27325740456581116, 0.1554531753063202, 0.15003199875354767, -0.22291865944862366, -1.035508632659912, 0.09141448885202408, 0.45292702317237854, -0.21995198726654053, 0.315400242805480...
.... </binding> </webHttpBinding> </bindings> ```
[ 0.269479900598526, 0.07876061648130417, 0.48892298340797424, 0.15921975672245026, -0.5535675883293152, -0.34378910064697266, 0.028445297852158546, -0.10900437831878662, -0.2689000368118286, -0.6974671483039856, -0.43252813816070557, -0.081285260617733, -0.5851055979728699, 0.28633666038513...
I've been trying to figure how the ArrayAdapter class can be used, and from the docs : <http://developer.android.com/reference/android/widget/ArrayAdapter.html>, I see the constructor expects an integer called textViewResourceId. What is this exactly? Edit: From a little more research and the answers here, it looks l...
[ 0.24310919642448425, -0.34065675735473633, 0.6279712915420532, -0.252483993768692, -0.2276444435119629, 0.07896558940410614, -0.0998612716794014, -0.5077559351921082, -0.1465339958667755, -0.6371892690658569, 0.05865656957030296, 0.7129356861114502, -0.41985082626342773, 0.1343384534120559...
update the info you will provide. You can use `textview` provided by android: ``` android.R.id.text1 ``` for instance. Or you can provide your own `textView` whit your custom id Edit change: ``` ArrayAdapter(this,android.R.layout.simple_list_item_1,myArrayList) ``` with ``` ArrayAdapter(this,android.R.id.text1...
[ 0.2150016576051712, -0.1816502809524536, 0.6917153000831604, -0.13695278763771057, -0.20181944966316223, -0.09233381599187851, 0.13355182111263275, -0.03871380537748337, -0.1768813282251358, -0.9131566882133484, -0.3369778096675873, 1.0259642601013184, -0.5466391444206238, -0.1397966742515...
I want to connect to a URL with the socket method ([http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=VS.96).aspx](http://msdn.microsoft.com/en-us/library/system.net.sockets.socket%28v=VS.96%29.aspx)); But I don't connect. I always get an Error : HostNotFound, but, I try with "google.com", for Url,...
[ 0.25589004158973694, 0.1015317291021347, 0.2722560465335846, 0.04571768268942833, -0.06918539106845856, 0.017833268269896507, 0.3637617826461792, 0.02381187677383423, -0.2846314311027527, -0.7043660283088684, 0.020726021379232407, 0.4565246105194092, -0.1694466471672058, 0.4314545392990112...
I was practicing the problem on Algorithm games , I tried the following problem but couldn't find the efficient way to do it:: So can you please help me.Here is the problem. This is the exact link:: <http://community.topcoder.com/tc?module=Static&d1=match_editorials&d2=srm228> I assume that you would like to solve th...
[ 0.08276443183422089, 0.06397037208080292, 0.20856653153896332, 0.20645299553871155, 0.020570918917655945, -0.0321100614964962, -0.28292596340179443, -0.16488289833068848, -0.4870810806751251, -0.2627031207084656, 0.2634529769420624, 0.3090202808380127, -0.2511255443096161, 0.14472977817058...
its subtype called [memoization](http://en.wikipedia.org/wiki/Memoization). The idea is to store a solution to each sub-problem with `L` coins missing from the left and `R` coins missing from the right (use an `NxN` array for it). Before solving a sub-problem, check the array to see if you've already solved it. You wou...
[ -0.6002234816551208, 0.08839873969554901, 0.18209032714366913, -0.10594523698091507, -0.0969768539071083, 0.20640404522418976, -0.007580036297440529, -0.3620924651622772, -0.32892531156539917, -0.4454896152019501, -0.21321499347686768, 0.16473999619483948, -0.25148898363113403, 0.171879887...
on his move int solved[N][N] // initialize each element to -1. int coins[N] // initialize with coin values int solve(int L, int R) { if (L+R == N) return 0; // No coins remain if (solved[L][R] >= 0) return solved[L][R]; int remaining = sum(coins from L to R) int takeLeft = remaining - solve(L+1, R...
[ -0.4351183772087097, -0.2893257737159729, 0.37254852056503296, -0.1276598572731018, 0.24363446235656738, 0.2789856195449829, 0.10826937109231949, -0.5544267892837524, -0.43861663341522217, -0.23870471119880676, -0.4886271059513092, -0.1557232141494751, -0.18312489986419678, 0.0584479048848...
int alice = solve(0, 0); int bob = sum(coins) - alice; } ``` I remember TopCoder running this problem some time in early 2005 or 2006, but I do not remember enough details to search their problem archive.
[ -0.2892581522464752, 0.21988604962825775, 0.08877140283584595, -0.40425094962120056, -0.1287296563386917, -0.0827360674738884, 0.40475931763648987, -0.2700652480125427, -0.44208934903144836, 0.09881725162267685, 0.05491885170340538, 0.21161772310733795, -0.5513845682144165, 0.1345836073160...
``` public class Connect { public static Connection getConnection(){ Connection con=null; String db_source="databasesource"; String db_username="username"; String db_password="password"; if(con==null) { try { Class.forName("com.ibm.db2.j...
[ 0.01901027373969555, -0.037828680127859116, 0.2816650867462158, -0.14055156707763672, 0.14191867411136627, -0.03549301624298096, 0.40019717812538147, -0.1347436159849167, 0.04063690826296806, -0.7429440021514893, -0.45375797152519226, 0.41803327202796936, -0.6383388042449951, 0.74752289056...
con=DriverManager.getConnection("jdbc:db2:http://localhost:50000/"+db_source,db_username,db_password); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
[ -0.05996020883321762, -0.3498762249946594, 0.03201708942651749, -0.22619645297527313, -0.07421943545341492, 0.13880516588687897, 0.29361069202423096, -0.20402146875858307, 0.18804647028446198, -0.3685368597507477, -0.09462903439998627, 0.6232719421386719, -0.5092472434043884, 0.12819723784...
return con; } } ``` I've db2 installed in my system. I've created two applications one a j2se and other jsp ( which runs on tomcat 7 ). I'am using same code for both j2se and jsp website but this code only works in j2se application, not in the jsp website. I don't know where is the problem. The error in jsp we...
[ 0.028604069724678993, 0.43726983666419983, 0.46860766410827637, -0.42641597986221313, 0.01586991548538208, -0.012886608019471169, 0.6342337727546692, 0.08269844949245453, -0.08642629534006119, -0.7697961330413818, 0.05448563024401665, 0.93150395154953, -0.35221627354621887, 0.2068515568971...
I'm using eclipse Indigo for EE. Any help from anyone will be great... Thanks in advance. ``` EDIT : I've also added the db2jcc.jar in the projects from build path > add external jar ``` I assume that you would like to solve this one by yourself, so I will give you a hint: this problem has [optimal substructure](ht...
[ 0.16346554458141327, 0.07558920234441757, 0.029899580404162407, -0.005004794802516699, -0.20685942471027374, 0.0995362177491188, -0.014888451434671879, -0.2049649953842163, -0.06489754468202591, -0.7996017932891846, 0.1384526640176773, 0.29757001996040344, -0.1702447533607483, -0.267807006...
idea is to store a solution to each sub-problem with `L` coins missing from the left and `R` coins missing from the right (use an `NxN` array for it). Before solving a sub-problem, check the array to see if you've already solved it. You would need to solve at most `N^2/2` subproblems to arrive at a solution. Here is p...
[ -0.5310105085372925, 0.06695577502250671, 0.233735129237175, -0.04613110423088074, 0.28763547539711, 0.23302391171455383, -0.025087159126996994, -0.42834705114364624, -0.5374407172203064, -0.46074506640434265, -0.1942710429430008, 0.22187082469463348, -0.23830267786979675, 0.02199020236730...
initialize each element to -1. int coins[N] // initialize with coin values int solve(int L, int R) { if (L+R == N) return 0; // No coins remain if (solved[L][R] >= 0) return solved[L][R]; int remaining = sum(coins from L to R) int takeLeft = remaining - solve(L+1, R); int takeRight = remaining...
[ -0.33702462911605835, -0.33898988366127014, 0.09350395202636719, -0.07140187919139862, 0.02112570032477379, 0.3411358594894409, 0.10150196403265, -0.6462223529815674, -0.42864152789115906, 0.024361858144402504, -0.27514979243278503, -0.07171507924795151, -0.20580235123634338, 0.05789780244...
solve(0, 0); int bob = sum(coins) - alice; } ``` I remember TopCoder running this problem some time in early 2005 or 2006, but I do not remember enough details to search their problem archive.
[ -0.2912595272064209, 0.28231340646743774, 0.1093468889594078, -0.4243791401386261, 0.02135525457561016, -0.07488520443439484, 0.4259534478187561, -0.24716563522815704, -0.38134270906448364, 0.044923096895217896, 0.06540659815073013, 0.20838631689548492, -0.531848132610321, 0.18231894075870...
I have a small project and I noticed that I have a lot of leaks in my code. So I started to use autorelease. But sometimes, I just cannot get rid of leaks or using autorelease causes analyzer to tell that there are too many autoreleases. Here is a function returning class attributedTitle containing font, shadow and ali...
[ 0.15548740327358246, 0.005637994967401028, 0.18525010347366333, 0.005249827168881893, -0.011420974507927895, -0.1621761918067932, 0.3385232985019684, -0.03063195012509823, -0.16135013103485107, -0.6309027075767517, 0.2003304362297058, 0.5355311036109924, -0.3657132387161255, 0.151810675859...
defaultParagraphStyle] mutableCopy] autorelease]; [pStyle setAlignment: NSCenterTextAlignment]; NSShadow *pShadow = [[[NSShadow alloc] init] autorelease]; [pShadow setShadowColor: [NSColor colorWithSRGBRed:0.11 green: 0.11 blue:0.11 alpha: 0.67]]; [pShadow setShadowBlurRadius: 1.0]; [pShadow set...
[ -0.385034441947937, -0.3850061893463135, 0.5444709062576294, -0.032677050679922104, 0.13554583489894867, 0.09166872501373291, 0.6206653714179993, -0.18855337798595428, -0.11501339823007584, -0.6006420254707336, -0.26539120078086853, 0.6746876239776611, -0.564909815788269, -0.37587454915046...
fontWithName: @"Arial Bold" size: 11], NSFontAttributeName, [NSColor colorWithDeviceWhite: 1.0 alpha: 0.83], NSForegroundColorAttributeName, pStyle, NSParagraphStyleAttributeName,
[ -0.05197695642709732, -0.5154216289520264, 0.5858888626098633, -0.11249092221260071, -0.280117392539978, 0.542224109172821, 0.2811347246170044, -0.10759196430444717, -0.0855734720826149, -0.9779694080352783, -0.018061473965644836, 0.3274243474006653, -0.1191008985042572, -0.069302044808864...
pShadow, NSShadowAttributeName, nil] mutableCopy] autorelease]; NSString *text = [[[NSString alloc] initWithFormat: @"%d", [[[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar]
[ -0.44032275676727295, -0.08536010980606079, 0.29157760739326477, -0.0682828426361084, 0.10058939456939697, 0.1526900827884674, 0.4829775393009186, -0.04730983451008797, -0.21591059863567352, -0.5978921055793762, -0.34179019927978516, 0.35451754927635193, -0.061787087470293045, 0.3176766932...
components: NSSecondCalendarUnit fromDate: [[NSDate alloc] init]]second]] autorelease]; NSAttributedString *result = [[[NSAttributedString alloc] initWithString: text attributes: attributes] autorelease]; return result; } ``` At first, this was shortened a lot - I didn't use variables if I was able to not,...
[ 0.0808711126446724, -0.5870943069458008, 0.4459178149700165, -0.1572170853614807, -0.25992026925086975, 0.01154436357319355, 0.5008842945098877, -0.4659997820854187, -0.16594596207141876, -0.2844904661178589, -0.07566598057746887, 0.5499688386917114, -0.25679904222488403, -0.01513982471078...
that - so this is actually just a example of leaks & autoreleases. I am pretty sure this could be done much simpler as well but right now I am concerned about correct use of autorelease and how to get rid of leaks.. And why I have leaks (I've got a lot more of code as well that I can fix if I realize what's wrong..) ...
[ 0.05979396030306816, -0.07329423725605011, 0.32150107622146606, 0.22521699965000153, 0.13562029600143433, -0.46284645795822144, 0.6168907284736633, -0.15097148716449738, -0.3767601251602173, -0.630281388759613, -0.21167439222335815, 0.6242594718933105, -0.38839957118034363, 0.1737789511680...
init] autorelease]; [pShadow setShadowColor: [NSColor colorWithSRGBRed:0.11 green: 0.11 blue:0.11 alpha: 0.67]]; [pShadow setShadowBlurRadius: 1.0]; [pShadow setShadowOffset: NSMakeSize(0,1)]; [pShadow set]; NSDictionary *attributes = [[[NSDictionary alloc] initWithObjectsAndKeys: ...
[ -0.13722318410873413, -0.3052845597267151, 0.5201124548912048, -0.03986750543117523, -0.05597488954663277, 0.32970136404037476, 0.4495271146297455, -0.23177163302898407, 0.05982732027769089, -0.8304975032806396, -0.29148802161216736, 0.4982735216617584, -0.3026660978794098, -0.165899515151...
[NSColor colorWithDeviceWhite: 1.0 alpha: 0.83], NSForegroundColorAttributeName, pStyle, NSParagraphStyleAttributeName, pShadow, NSShadowAttributeName,
[ 0.25672969222068787, -0.8080093860626221, 0.35300755500793457, 0.0708698183298111, -0.08213707059621811, 0.06731303781270981, 0.16831070184707642, -0.20743361115455627, -0.15777379274368286, -0.7236958742141724, 0.04279298335313797, 0.22633469104766846, -0.23077329993247986, 0.206589624285...
nil] autorelease]; NSDateComponents *dc = [[[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar] autorelease] components: NSSecondCalendarUnit fromDate: [[[NSDate alloc] init] autorelease]]; return [[[NSAttributedString alloc] initWithString: [[[NSString alloc] init...
[ 0.05356965586543083, -0.42177221179008484, 0.5371615886688232, -0.03859689086675644, -0.02357875555753708, 0.03726733848452568, 0.2662181556224823, -0.16169138252735138, -0.25930699706077576, -0.45547255873680115, -0.1636362075805664, 0.4001707434654236, 0.11855033785104752, 0.527614891529...
NSDate *tempMonth = [[[NSDate alloc] initWithString: [[[NSString alloc] initWithFormat: @"31.12.%ld", year] autorelease]] autorelease]; SInt32 result = CFAbsoluteTimeGetWeekOfYear([tempMonth timeIntervalSinceReferenceDate], CFTimeZoneCopyDefault()); return result; } SInt32 CFWeekOfYear(CFGregorianDate tempMont...
[ -0.02779792994260788, -0.106340691447258, 0.703070342540741, -0.1965065449476242, 0.10808829963207245, -0.21740737557411194, 0.4935095012187958, -0.4091484844684601, -0.17689445614814758, -0.31635311245918274, -0.16767962276935577, 0.5354801416397095, -0.19133585691452026, 0.13492977619171...
__CFTimeZone * CFTimeZoneRef; ``` Yep, it's a pointer. This pointer isn't a reference to a Cocoa object, but it's a reference to allocated memory nonetheless. We know from the function naming conventions in Core Foundation that any CF function with the word 'copy' in it is allocating memory. That means that it's up ...
[ 0.269118070602417, 0.2797790765762329, 0.5622596740722656, -0.11703674495220184, 0.3986860513687134, -0.3416896462440491, 0.17145122587680817, -0.026938796043395996, -0.24398280680179596, -0.5207973718643188, 0.0730292871594429, 0.6130784749984741, -0.48590224981307983, 0.15911921858787537...
return CFAbsoluteTimeGetWeekOfYear(tempDate, CFTimeZoneCopyDefault()); } ``` We can keep a reference to the `CFTimeZoneRef`, and then dispose of it when we're done: ``` SInt32 CFWeekOfYear(CFGregorianDate tempMonth) { CFTimeZoneRef tzRef = CFTimeZoneCopyDefault(); CFAbsoluteTime tempDate = CFGregorianDateGet...
[ 0.08985551446676254, 0.12630218267440796, 0.45206645131111145, -0.32613375782966614, 0.1916341483592987, -0.14603780210018158, 0.5259367227554321, -0.41988903284072876, -0.20284555852413177, -0.2827620506286621, -0.22931845486164093, 0.803785502910614, -0.3325519859790802, -0.0666178315877...
so large. Be careful relying on autoreleased objects in places like loops and recursive methods; you can allocate your own autorelease pools (and release them) judiciously to avoid this kind of problem. In this forum, I can only be so verbose, so I recommend reading: [Apple Memory Management Guide](https://developer.a...
[ 0.17587405443191528, 0.19187431037425995, 0.5750488638877869, 0.03392329439520836, 0.2811623215675354, -0.24300900101661682, 0.14160974323749542, 0.33002546429634094, -0.42530062794685364, -0.30349797010421753, -0.1567460000514984, 0.6405994892120361, -0.32346460223197937, -0.0190714634954...
I have a table like this in my database (SQL Server 2008) ``` ID Type Desc -------------------------------- C-0 Assets No damage C-0 Environment No impact C-0 People No injury or health effect C-0 Reputation No impact C-1 Assets Slight damage C-1 Environment Slig...
[ -0.06965908408164978, 0.4903373420238495, 0.2544529438018799, 0.21902181208133698, 0.021204998716711998, -0.13308095932006836, 0.25840523838996887, -0.0015483814058825374, -0.5514730215072632, -0.5286993980407715, -0.30655986070632935, 0.5715047717094421, 0.11579916626214981, 0.00727633526...
First Aid Case (FAC) C-1 Reputation Slight impact; Compaints from local community ``` i have to display the Assets, People, Environment and Reputation as columns and display matched Desc as values. But when i run the pivot query, all my values are null. Can somebody look into my query ans tell me where i am doi...
[ -0.271722674369812, 0.11977216601371765, 0.570266604423523, -0.15682920813560486, -0.09841203689575195, 0.37783384323120117, 0.38027864694595337, -0.8040573596954346, -0.2802608609199524, -0.640471875667572, -0.11195055395364761, 0.7670589089393616, -0.22284477949142456, -0.177005231380462...
my output ``` ID People Assets Env Rep ----------------------------------- C-0 NULL NULL NULL NULL C-1 NULL NULL NULL NULL C-2 NULL NULL NULL NULL C-3 NULL NULL NULL NULL C-4 NULL NULL NULL NULL C-5 NULL NULL NULL NULL ``` ``` Select severity_id, pt.People...
[ -0.1331838071346283, 0.2106359452009201, 0.30720555782318115, 0.0007471755379810929, 0.10632609575986862, 0.2409782111644745, 0.2832912802696228, -0.18153297901153564, -0.08731555193662643, -0.7591685652732849, -0.015023070387542248, 0.6420916318893433, -0.1315615028142929, 0.0148348324000...
select * from COMM.Consequence ) As Temp PIVOT ( max([DESCRIPTION]) FOR [TYPE] In([People], [Assets], [Environment], [Reputation]) ) As pt ```
[ 0.23413695394992828, -0.5441632866859436, 0.32811105251312256, 0.04314916580915451, 0.26237592101097107, 0.4410839080810547, -0.03455866128206253, -0.3883078396320343, -0.017736969515681267, -0.20457768440246582, -0.21528302133083344, 0.3001319468021393, -0.37609952688217163, -0.0379481464...
I'm trying to load a model to add dirty data to the store, but can't seem to load up the actual model to then setData to it... Doing this: ``` var model = Ext.ModelMgr.getModel("AT.model.Booking"); ``` returns: ``` function () { return this.constructor.apply(this, arguments); } ``` Which doesn't seem right a...
[ 0.22399459779262543, 0.0019353836541995406, 0.600523054599762, 0.011063518933951855, 0.14795911312103271, -0.29087674617767334, 0.351678729057312, -0.2849826514720917, -0.24625445902347565, -0.390551894903183, 0.008809992112219334, 0.5000381469726562, -0.5513025522232056, 0.383710473775863...
model you want to get. You seem to be passing it the class name of a model. Unless `AT.model.Booking` is an `id` for an actual model instance. Which seems weird to me but it's none of my business then :P
[ 0.3977797031402588, -0.177688866853714, 0.2692943513393402, 0.198975071310997, 0.3348272740840912, -0.11715260148048401, -0.05884469300508499, 0.2601678669452667, -0.4743897616863251, -0.16400867700576782, 0.24075286090373993, 0.42896854877471924, 0.014634792692959309, 0.14366355538368225,...
First of all, I know there are a few quite similar questions here on stackoverflow about that form problem but none of them could actually help me so I'm giving it a try myself. I've been stuck with this for the past 10 hours and I'm really desesperate right now. So, let's start with my directory structure: ``` gpo...
[ 0.4328112006187439, 0.3095138370990753, 0.6018412709236145, -0.3012125492095947, 0.09179683774709702, -0.20256170630455017, -0.03293171152472496, 0.024124445393681526, -0.04388997331261635, -0.6755832433700562, 0.23011738061904907, 0.8005516529083252, -0.016025898978114128, 0.2413012385368...
--- controllers/ --- CustomerController.php --- views/ --- Bootstrap.php ---- public/ ---- library/ --- Doctrine/ --- GPos/ --- Doctrine/
[ 0.005612676031887531, 0.11533991992473602, 0.09568770229816437, 0.3262766897678375, 0.11449743062257767, -0.02143649198114872, -0.1904887855052948, -0.09499181807041168, -0.3197351396083832, -0.37924468517303467, -0.568267285823822, 0.6451808214187622, 0.07004304230213165, -0.1983953267335...
--- ActiveEntity.php --- Models/ --- Customer.php ``` As you can see, I'm using Zend's standard forms/ folder to store my forms and I'm also using Doctrine as DB manager. --- So I've been trying to reach my `CustomerForm.php` from `CustomerController.php` but simply getting a not found err...
[ 0.11367389559745789, 0.045073624700307846, 0.5651944279670715, -0.08645761758089066, 0.04116356372833252, -0.1503000110387802, 0.24302048981189728, -0.13785333931446075, -0.13234013319015503, -0.5663279294967651, -0.21129834651947021, 0.7371008992195129, -0.10253283381462097, 0.13246072828...
/* Initialize action controller here */ } public function indexAction() { $form = new Form_CustomerForm(); //line 9 $form->setAction('/customer/index'); $form->setMethod('post'); $this->view->form = $form; } ``` and `CustomerForm.php:` ``` class Form_CustomerForm extends...
[ -0.039449695497751236, -0.5205674767494202, 0.8483506441116333, -0.19578678905963898, -0.10001969337463379, 0.08719288557767868, 0.06492234021425247, -0.47007712721824646, -0.15420770645141602, -0.3784981369972229, -0.22230790555477142, 0.5797934532165527, -0.29537200927734375, 0.090673461...
today that it was already in thanks to Zend doing it for us. So... What am I doing wrong? I found tons of posts saying how to add resources and how to manage custom forms and I feel I'm doing exactly what's asked but it just won't work not matter what. I'm afraid that it comes from somewhere else cause I've been tryin...
[ 0.5797367095947266, 0.06974562257528305, 0.41032129526138306, 0.06337185949087143, -0.026641007512807846, 0.04650755226612091, 0.40456438064575195, -0.5345619916915894, -0.2789880633354187, -0.589019775390625, 0.025844432413578033, 0.7075178623199463, 0.07023493945598602, 0.075503557920455...
'Application', 'basePath' => APPLICATION_PATH, )); $autoloader->addResourceType('gpos', '/../../library/GPos', 'GPos'); $autoloader->addResourceType('doctrine', '/../../library/GPos/Doctrine', 'GPos_Doctrine'); return $autoloader; } ``` This didn't work either. I'm quite unsure of the 'pa...
[ 0.23540829122066498, 0.43762722611427307, 0.40616297721862793, -0.00407947925850749, -0.009129139594733715, 0.21556372940540314, 0.4690144956111908, -0.561307966709137, -0.05747148022055626, -0.6907167434692383, -0.1254737377166748, 0.9396725296974182, -0.3097023367881775, -0.0781922191381...
don't understand what's wrong with my resource types I'm adding. Please note that I didn't use zf tools to build that project. I'm considering doing it if I don't find a way to make it all work correctly. I've also tried to rename my form class to "Application\_Form\_CustomerForm" but didn't do any good either. I fe...
[ 0.7892467975616455, 0.29343003034591675, 0.49198779463768005, 0.07606670260429382, 0.24198414385318756, -0.19572971761226654, 0.3812582194805145, 0.2261255979537964, -0.1471281200647354, -0.6991501450538635, 0.25165340304374695, 0.6180413365364075, -0.13958273828029633, 0.3561204671859741,...
doing this project as my IT Bachelor work graduation and I really shouldn't get into hacking things to make them work :P. Thank you for anybody paying attention! either add an bootstrap to the default module (which in turn sets the resourcetypes automaticly) ``` class Default_Bootstrap extends Zend_Application_Modu...
[ 0.39024481177330017, -0.24369561672210693, 0.30715134739875793, 0.08291149884462357, 0.26430854201316833, -0.28752362728118896, 0.4798832833766937, -0.298615038394928, -0.24032792448997498, -0.6879830360412598, -0.32019516825675964, 0.7730205059051514, -0.3013664484024048, -0.2135323435068...
'basePath' => APPLICATION_PATH . '/modules/default')); return $moduleLoader; } } ``` or add this to your global bootstrap (extend it with your two custom resourcetypes): ``` public function _initDefaultResourceTypes() { $al = new Zend_Application_Module_Autoloader(array( 'namespace' => '', ...
[ -0.0625360757112503, -0.16664426028728485, 0.7143586277961731, -0.20843440294265747, 0.21600767970085144, 0.009751604869961739, 0.19813671708106995, -0.49289724230766296, -0.0705416351556778, -0.6520001888275146, -0.12787438929080963, 0.6534156203269958, -0.5112566351890564, 0.040658295154...
'namespace' => 'Model_DbTable', 'path' => 'models/DbTable', ), 'mappers' => array( 'namespace' => 'Model_Mapper', 'path' => 'models/mappers',
[ -0.4191914498806, -0.2143276333808899, 0.5305836200714111, 0.19176846742630005, 0.08835043758153915, 0.24433477222919464, -0.22254414856433868, -0.46631190180778503, -0.2526668906211853, -0.840718150138855, -0.21530640125274658, 0.26211950182914734, -0.2636154890060425, 0.2244470864534378,...
), 'form' => array( 'namespace' => 'Form', 'path' => 'forms', ), 'model' => array(
[ -0.18533404171466827, -0.20606140792369843, 0.18219049274921417, 0.11074819415807724, -0.007906333543360233, 0.14442254602909088, 0.16327865421772003, -0.40374574065208435, 0.019709385931491852, -0.4740426540374756, -0.46496695280075073, 0.21882811188697815, -0.3338845372200012, 0.11364533...
'namespace' => 'Model', 'path' => 'models', ), 'plugin' => array( 'namespace' => 'Plugin', 'path'
[ -0.26954150199890137, -0.2880301773548126, 0.1719013750553131, 0.08193827420473099, 0.1945360004901886, 0.18512722849845886, 0.013885676860809326, -0.348581463098526, -0.17064613103866577, -0.7806942462921143, -0.39506107568740845, 0.26585668325424194, -0.3723278343677521, 0.13812245428562...
=> 'plugins', ), 'service' => array( 'namespace' => 'Service', 'path' => 'services', ), 'viewhelper' => array(
[ -0.22758908569812775, -0.12826861441135406, 0.2521224319934845, -0.14783142507076263, 0.07864894717931747, 0.33503609895706177, 0.2606087327003479, -0.19594387710094452, -0.030713049694895744, -0.7719026207923889, -0.4967990219593048, 0.4004918336868286, -0.3879183232784271, 0.046374294906...
'namespace' => 'View_Helper', 'path' => 'views/helpers', ), 'viewfilter' => array( 'namespace' => 'View_Filter', 'path'
[ -0.2865075469017029, -0.48968666791915894, 0.4674966037273407, -0.14041289687156677, 0.08657310903072357, 0.2171754539012909, -0.022158129140734673, -0.3050055503845215, -0.22518590092658997, -0.7722061276435852, -0.3823034167289734, 0.4498264789581299, -0.537124752998352, -0.0696344822645...
=> 'views/filters', ) ) )); $al->setDefaultResourceType('model'); } ``` take a look at this ZF 1 Skeleton for further info: <https://github.com/eddiejaoude/Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD->
[ 0.17983826994895935, -0.02979424223303795, 0.31505337357521057, -0.1440172791481018, -0.06471225619316101, -0.3526614308357239, 0.25875967741012573, -0.37378907203674316, 0.10759659856557846, -0.4751448929309845, -0.36314865946769714, 0.5062315464019775, -0.44349345564842224, -0.0042348448...
I have `MVC` `webApi` application which works with `Unity`. I have to resolve interface `ITest` to singleton class (`DelegateHandler`). But interface ITest has per `httprequest` lifetime manager and it is important. So i can't resolve ITest on `Application_Start` event because there isn't HttpRequest right now but Dele...
[ -0.27302679419517517, -0.09293298423290253, 0.5157473087310791, 0.058191653341054916, -0.1085195392370224, -0.16377772390842438, 0.2686997652053833, -0.11266530305147171, -0.1841597706079483, -1.004169225692749, -0.028365975245833397, 0.5119886994361877, -0.18151509761810303, 0.46254837512...
that's not possible, wrap the dependency (`DelegateHandler` I assume) that has a per Http Request lifetime in a proxy: ``` // Proxy public class DelegateHandlerProxy : IDelegateHandler { public Container Container { get; set; } // IDelegateHandler implementation void IDelegateHandler.Handle() { ...
[ -0.0782117247581482, -0.08631561696529388, 0.48525214195251465, -0.01434963010251522, 0.021342488005757332, 0.1560116857290268, 0.11433020234107971, -0.2809557616710663, -0.28814584016799927, -0.8564713001251221, -0.12887732684612274, 0.2669186592102051, -0.23588117957115173, 0.51331204175...
I'm echoing a php string variable into html ``` <span class="title_resource"> <?php echo $titulo; ?> </span> ``` But when the plus sign (+) is present, it turns into a space. I've already tried using urlencode but then I get something like "Constru%25C3%25A7%25C3%" Should I use something like string replace? T...
[ 0.32498860359191895, 0.17664486169815063, 0.9938549399375916, -0.004768194630742073, -0.08494099974632263, 0.0025827065110206604, 0.14583498239517212, -0.28618302941322327, -0.11376629769802094, -0.4137430191040039, -0.22851605713367462, 0.5496786236763, -0.2963860332965851, -0.05651869252...
GET, spaces are converted to `+` and `+` are converted to `%2B`. If you really want to send the plus symbol over the form, then replace the spaces with plus ``` $text= str_replace(" ", "+", $text); ``` Next make sure your form uses correct `enctype` either `application/x-www-form-urlencoded` or `multipart/form-data...
[ 0.24744299054145813, 0.11784325540065765, 0.7872632145881653, -0.09764368087053299, -0.031071510165929794, -0.04320096969604492, 0.25224730372428894, -0.13062432408332825, 0.12956731021404266, -0.842884361743927, -0.4617335796356201, 0.38918912410736084, -0.3113371431827545, -0.20226201415...
In my ruby model I have a has\_and\_belongs\_to\_many relation with a model "search": ``` has_and_belongs_to_many :searches ``` I want to add a new search object only if it does not already exists, so I wrote: ``` def append_unless_already_there search unless searches.exists?(search) searches << search end `...
[ 0.03483298048377037, 0.2571488320827484, 0.5245499014854431, -0.2778725326061249, -0.21805551648139954, -0.0670417994260788, 0.6025440096855164, -0.4205070436000824, -0.047133419662714005, -0.6634154319763184, -0.05058212950825691, 0.49689939618110657, -0.42372429370880127, 0.2202440053224...
puts s.id end puts "]" puts search.id searches << search end end ``` Adding 5 search objects, of which the last 2 are equal, results in the following logging when adding the last object: ``` false [ 12 5 8 1 ] 1 ``` As I read the documentation and examples given, this last exists? check should r...
[ 0.08921784907579422, 0.21216879785060883, 0.377136766910553, -0.20165881514549255, 0.1906995326280594, 0.15498334169387817, 0.23288114368915558, -0.35576698184013367, -0.3654012382030487, -0.6808814406394958, -0.12474748492240906, 0.362636923789978, 0.083610899746418, 0.14368225634098053, ...
of include , it takes key or object as well : ``` include?(key) ``` For more detail check on <http://api.rubyonrails.org/>
[ 0.5533986687660217, 0.15102683007717133, -0.27532580494880676, -0.27321961522102356, -0.05216316506266594, -0.25229886174201965, 0.4706868827342987, -0.6657135486602783, -0.19154706597328186, 0.049650803208351135, -0.1870783120393753, 0.31902778148651123, -0.6623485088348389, 0.10875048488...
I am using Ruby 1.8.7 and Rails 2.3.5 version . When I try to start the server it throws the below error. When I list the gem its shows the rake there but of different version ``` actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) bundler (1.1.3) fattr (2.2.1) gi...
[ 0.3409171402454376, -0.23590686917304993, 0.675186276435852, -0.00871327519416809, -0.20012344419956207, -0.13638143241405487, 0.8168692588806152, -0.5539749264717102, 0.015096982009708881, -0.7272676825523376, -0.11098932474851608, 0.6707919836044312, -0.2252207249403, -0.0615157485008239...