text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
}
else{
Log.e("Else", "Else case"); | [
-0.2783936858177185,
-0.10880862921476364,
0.03369707241654396,
-0.3050496280193329,
0.6983928680419922,
-0.18488074839115143,
0.060651496052742004,
-0.07983890920877457,
0.2629919946193695,
-0.17157982289791107,
-0.5119757652282715,
1.0284610986709595,
-0.28796491026878357,
-0.44506359100... | |
}
imgBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(position==0) | [
-0.20110999047756195,
-0.3470843732357025,
0.5104329586029053,
-0.31856730580329895,
0.1362302601337433,
0.3245224952697754,
0.5346437096595764,
-0.42935994267463684,
-0.12180373072624207,
-0.4327256977558136,
0.05501514673233032,
0.5712261199951172,
-0.42424696683883667,
0.207617998123168... | |
{
ID[position]=1;
}
else
{ | [
-0.22536307573318481,
-0.24876900017261505,
-0.04135575890541077,
-0.322239488363266,
0.15369464457035065,
-0.1742851287126541,
-0.07967278361320496,
-0.06664150208234787,
0.10916264355182648,
-0.11718601733446121,
-0.21633140742778778,
0.5469920635223389,
-0.012532197870314121,
-0.2726297... | |
ID[position]=position;
}
parent.getChildCount();
Toast.makeText(mContext, position+"", Toast.LENGTH_SHORT).show();
parent.getChildAt(position).findViewById(R.id.progressbar_Horizontal).setVisibility(View.VISIBLE); | [
0.1254042536020279,
-0.08173180371522903,
0.4997575581073761,
-0.2376720905303955,
0.1876106858253479,
0.1703609675168991,
0.6258153319358826,
-0.2930454611778259,
0.0014145500026643276,
-0.7865516543388367,
-0.6146730184555054,
0.16839708387851715,
0.09212647378444672,
0.24411435425281525... | |
BackgroundAsyncTask objDownload=new BackgroundAsyncTask(parent,position);
objDownload.execute();
}
});
return rowView;
}
private class BackgroundAsyncTask extends
AsyncTask<Void, Integer, | [
-0.12347202003002167,
-0.24178166687488556,
0.24412338435649872,
-0.3257203996181488,
0.20529158413410187,
0.5315714478492737,
0.5186393857002258,
0.055016037076711655,
-0.31403887271881104,
-0.5835464000701904,
-0.37893223762512207,
0.23503737151622772,
-0.457520455121994,
-0.048717413097... | |
Void> {
public BackgroundAsyncTask(ViewGroup vg,int position) {
this.subGroup=vg;
this.pos=position;
}
int myProgress;
private ViewGroup subGroup;
private int pos;
@Override
protected void onPostExecute(Void result) {
// TODO Auto-genera... | [
0.2157423198223114,
-0.15457318723201752,
0.18214596807956696,
-0.3421905040740967,
0.1084539070725441,
0.3732573688030243,
0.3787080645561218,
-0.2058330774307251,
0.047265250235795975,
-0.3312022387981415,
-0.16176803410053253,
0.3239014744758606,
-0.32373887300491333,
-0.025562612339854... | |
subGroup.getChildAt(pos).findViewById(R.id.Download).setVisibility(View.VISIBLE);
subGroup.getChildAt(pos).findViewById(R.id.progressbar_Horizontal).setVisibility(View.INVISIBLE);
Toast.makeText(mContext,"Download finished "+pos, Toast.LENGTH_SHORT).show();
ID[1]=0;
... | [
0.22442786395549774,
-0.2480277568101883,
0.5273893475532532,
-0.25232788920402527,
0.11670023202896118,
0.0823139101266861,
0.37230971455574036,
-0.32955193519592285,
-0.1743309199810028,
-0.5836009979248047,
-0.4999573826789856,
0.3267837166786194,
-0.20319245755672455,
0.173875913023948... | |
myProgress = 0;
imgBtn.setVisibility(View.INVISIBLE);
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
while(myProgress<100){
myProgress++;
publishProgress(myProgress);
SystemClock.sleep(100); | [
0.09134776145219803,
0.11741958558559418,
0.7264841794967651,
-0.47856059670448303,
0.5655026435852051,
0.03923995420336723,
0.6329615116119385,
-0.21017055213451385,
0.015259542502462864,
-0.6313585638999939,
-0.2834882438182831,
0.5895014405250549,
-0.3783225119113922,
0.2071963101625442... | |
}
return null;
}
protected void onProgressUpdate(Integer... values) {
process.setProgress(values[0]);
}
}
}
```
Have you went through the [Authentication documentation](https://developers.facebook.com/docs/authentication/)?
It pretty much cover all of the opti... | [
0.2782294750213623,
0.1288091391324997,
0.37773266434669495,
-0.2784445583820343,
0.027662470936775208,
-0.08668414503335953,
0.21672746539115906,
-0.2478344589471817,
-0.16845053434371948,
-0.5602138638496399,
-0.22022879123687744,
0.4734184443950653,
-0.32247912883758545,
0.1253005415201... | |
can probably use any of those approaches, but the 3rd probably will fit best. | [
0.020577482879161835,
0.20186802744865417,
0.17094160616397858,
0.2774758040904999,
-0.05470671504735947,
0.18163177371025085,
0.28573089838027954,
-0.19253353774547577,
-0.22493314743041992,
-0.5249983072280884,
0.025874458253383636,
0.4315808415412903,
-0.10830768942832947,
-0.1719273477... | |
I have a page like below;
```
<style type="text/css">
#test a{
display: block;
width: 150px;
height: 50px;
background-color: #CCCCCC;
}
</style>
<div id="test">
<a>text text text<img src="image.jpg"></a>
</div>
```
I am getting the result like;

Bu... | [
-0.15123005211353302,
-0.0588340237736702,
0.7592446804046631,
-0.05305226892232895,
-0.1385796219110489,
0.08302658796310425,
0.3372723460197449,
-0.33531200885772705,
-0.4988038241863251,
-0.6609379053115845,
0.2844861149787903,
0.1919868439435959,
0.25487610697746277,
0.0946030840277671... | |
I want to Remove the Line Break from the string if my string Ends with Line Break.
```
Sub linebreak(myString)
If Len(myString) <> 0 Then
If Right$(myString, 1) = vbCrLf Or Right$(myString, 1) = vbNewLine Then myString = Left$(myString, Len(myString) - 1)
End If
End Sub
```
`vbCrLf` and `vbNewLine` ar... | [
-0.22982321679592133,
-0.42781785130500793,
0.755798876285553,
-0.3642716705799103,
-0.06363938748836517,
0.09416557103395462,
0.3102242648601532,
-0.23225194215774536,
-0.061197251081466675,
-0.23661154508590698,
-0.5015831589698792,
0.4987313151359558,
-0.377260684967041,
0.2435184121131... | |
myString = Left$(myString, Len(myString) - 2)
End If
End If
End Sub
``` | [
-0.2872508466243744,
-0.3537282347679138,
0.525023341178894,
-0.11242188513278961,
0.03398437798023224,
-0.054057665169239044,
0.14526931941509247,
-0.09532986581325531,
-0.08073355257511139,
-0.021977925673127174,
-0.24926628172397614,
0.5134188532829285,
-0.2767132520675659,
0.2434780001... | |
As usual, when a tableviewcell is touched, it will be selected. But now i need one cell in my tableview never be selected.how could i forbid a tableviewcell to be selected?
After modifying didSelectRowForIndexPath: method. It works now. Thx ALl:)
Once the cell (need to be forbidden) is selected i just use the selectRo... | [
0.07333096861839294,
0.009904430247843266,
0.6525352597236633,
0.13246972858905792,
-0.022794432938098907,
-0.11571738123893738,
-0.03670824319124222,
-0.13756540417671204,
-0.18661658465862274,
-1.0738534927368164,
0.14579254388809204,
0.13124805688858032,
-0.35011041164398193,
0.18550239... | |
I have text input element and an event is fired on blur event and when user presses enter.
My problem is that if user inputs "foo" and presses enter `val()` function nevertheless returns null, after the blur event `val()` returns foo. As far as I understand it is due to the fact that value property of HTML input elem... | [
0.03245750069618225,
0.21910548210144043,
0.8248269557952881,
-0.42000916600227356,
-0.09356993436813354,
-0.03435725346207619,
0.502644419670105,
-0.5406076312065125,
0.11273239552974701,
-0.48297521471977234,
0.11042845249176025,
0.7997626066207886,
-0.5735706686973572,
-0.05685004219412... | |
meetmove_map.geocodeAddress(type, value);
};
$(document).ready(function(){
$('input[data-type="name"]').blur(meetmove_address_field_listener);
$('input[data-type="name"]').keypress(function(event){
if (event.which == 13){
event.preventDefault();
meetmove_address_field_listener(e... | [
-0.15923188626766205,
-0.005319787655025721,
1.044005274772644,
0.0671916976571083,
0.06969502568244934,
-0.09584566950798035,
0.5396521091461182,
-0.6328192949295044,
0.20474247634410858,
-0.4250894784927368,
-0.4320313036441803,
0.4642017185688019,
-0.3674868047237396,
0.0175135489553213... | |
code:
```
$(document).ready(function(){
$('input[data-type="name"]').blur(meetmove_address_field_listener);
$('input[data-type="name"]').keyup(function(event){
if (event.which == 13){
event.preventDefault();
var type = $(this).attr('data-marker-type');
var value = $... | [
0.025662284344434738,
-0.1906156837940216,
0.9461502432823181,
-0.044739771634340286,
0.15096600353717804,
0.06607406586408615,
0.2507960796356201,
-0.4713055193424225,
0.016298407688736916,
-0.77071213722229,
-0.5210372805595398,
0.5980696678161621,
-0.4741273522377014,
0.2497129291296005... | |
});
});
``` | [
-0.09954391419887543,
0.23971500992774963,
0.4336956739425659,
-0.5432102084159851,
0.2865300476551056,
-0.26544851064682007,
0.3198486864566803,
-0.014538511633872986,
0.19142629206180573,
-0.3682454824447632,
-0.44257283210754395,
0.9352086186408997,
-0.5493782758712769,
0.27220249176025... | |
I need to read a text file and store it into Db. After several times accessing/reading the file, suddenly this message appears
> the process cannot access the file because it is being used by another process..
I've checked for several times, but there's not other process attached to it. Here are my code..
```
// St... | [
0.4240742027759552,
0.3585050702095032,
0.4295143187046051,
-0.21406912803649902,
0.09879573434591293,
0.06338038295507431,
0.5855375528335571,
-0.5069718956947327,
0.15343736112117767,
-0.9473633170127869,
-0.0870685875415802,
0.16265639662742615,
-0.4666196405887604,
0.36057615280151367,... | |
src="<url of the page>"
frameborder="0"
min-height="600px"
width="100%">
</iframe>
```
javascript/jquery:
```
$(document).ready(function(){
var frame = $('iframe#containter-frame');
//hide document default scroll-bar
document.body.style.overflow = 'hidden';
frame.load(resi... | [
0.21973662078380585,
0.019733794033527374,
0.9969041347503662,
-0.3056982755661011,
0.08822396397590637,
0.059875600039958954,
0.2771426737308502,
-0.7504174709320068,
-0.2630297541618347,
-0.5270575881004333,
-0.4636903703212738,
0.5386481285095215,
-0.05372334644198418,
0.098415523767471... | |
//detect browser dimensions
if($.browser.mozilla){
h = $(window).height();
w = $(window).width();
}else{
h = $(document).height();
w = $(document).width(); | [
0.2782776355743408,
-0.16792556643486023,
0.5398083329200745,
-0.30423882603645325,
0.18230192363262177,
-0.08336877077817917,
0.3635278046131134,
-0.23719926178455353,
-0.03217165172100067,
-0.7896975874900818,
-0.20761510729789734,
0.5463962554931641,
-0.2662697732448578,
0.0858923271298... | |
}
//set new dimensions for the iframe
frame.height(h);
frame.width(w);
}
});
```
The trick here is `frame.load` method waits for the frame to load. After that the height and width is manipulated as required. Here i am setting is to cover whole of the screen. And the page contains only... | [
0.13111642003059387,
0.09599539637565613,
0.8480399250984192,
-0.25526657700538635,
0.13023018836975098,
-0.1032441258430481,
0.20716330409049988,
-0.29327550530433655,
-0.08839189261198044,
-0.8546099662780762,
-0.009831770323216915,
0.5740290880203247,
-0.20557427406311035,
0.18174044787... | |
As a part of a input validation I was thinking whether this is a really valid cron expression and how it would executed:
```
0 0/0 * * * ?
```
Quartz validation returns true
```
org.quartz.CronExpression.isValidExpression("0 0/0 * * * ?")
```
So, does this run all the time, never, every hour or every minute...?
A... | [
0.23491249978542328,
0.11561895906925201,
0.4611794352531433,
-0.15806429088115692,
0.1982668787240982,
0.19247768819332123,
0.31362849473953247,
-0.24571560323238373,
-0.14542600512504578,
0.08496522903442383,
-0.13272938132286072,
0.552858829498291,
0.15512123703956604,
-0.01895440183579... | |
this case '' is equivalent to having '0' before the '/'. '1/3' in the day-of-month field means "fire every 3 days starting on the first day of the month".
This means `0` doesn't really make sense in this context. However [`CronExpression`](http://quartz-scheduler.org/api/2.1.0/org/quartz/CronExpression.html) seems to ... | [
0.24062488973140717,
0.3578436076641083,
0.5577107071876526,
-0.2911399304866791,
-0.09746641665697098,
-0.04164537414908409,
0.6416193246841431,
-0.48103901743888855,
-0.3553983271121979,
-0.02395302802324295,
-0.2911551296710968,
0.6255043745040894,
-0.06386362016201019,
0.23304711282253... | |
set.add(Integer.valueOf(val));
} else {
set.add(NO_SPEC);
}
return;
}
``` | [
0.5725348591804504,
-0.21564428508281708,
0.39946892857551575,
-0.2548287808895111,
0.18229332566261292,
-0.07526417076587677,
0.1597456932067871,
-0.39600950479507446,
-0.1910141259431839,
-0.4333851933479309,
-0.3739369809627533,
1.0433943271636963,
-0.4082774817943573,
0.144942179322242... | |
If I need to access the same instance of a class in many other classes inside my app, is it good practice to create a property in my app delegate containing this instance, then access the property from wherever I need it inside my app, using `[UIApplication sharedApplication].delegate.instance`?
I don't think so. The b... | [
0.015973851084709167,
0.15365876257419586,
0.27994903922080994,
-0.05059010908007622,
0.3665091395378113,
0.05956922098994255,
0.5996066927909851,
0.2517855167388916,
-0.2652614116668701,
-0.8913470506668091,
-0.16687363386154175,
0.64155513048172,
0.2275187373161316,
-0.08248457312583923,... | |
I want to create log file for my flex application. That is the file should contain all the trace prints in it when I run my flex application. How can I configure flex to do this? thanks
With the debug Flash Player, you can write your trace statements to disk by [editing/creating the mm.cfg file](http://help.adobe.com/e... | [
0.7914817929267883,
0.03962966799736023,
0.28628507256507874,
0.12956169247627258,
0.18396322429180145,
-0.25219035148620605,
0.10079475492238998,
-0.15346330404281616,
-0.48837539553642273,
-0.6250001788139343,
0.2513923943042755,
0.6510142087936401,
-0.24282206594944,
-0.1827150136232376... | |
I'm trying some iOS test applications on the new Mac mini, that supports Bluetooth Low Energy. The [CoreBluetooth](http://developer.apple.com/library/ios/#documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/_index.html) framework is used in those. However, I'm not able to get Bluetooth working in the iPhone s... | [
0.22108058631420135,
0.27416184544563293,
0.3203967809677124,
0.20879951119422913,
-0.0734933540225029,
-0.2983779013156891,
0.47812142968177795,
0.22120292484760284,
-0.034228309988975525,
-0.6277052760124207,
-0.2220202535390854,
0.4900236129760742,
-0.18967844545841217,
0.17771719396114... | |
enable Bluetooth. However, after I told it to enable Bluetooth, it just shows the spinning animation, and it won't either complete or cancel. Even after rebooting the Mac, there is still only the spinning animation. The box also does not open up anymore.
Essentially, I think that the iPhone simulator should support Bl... | [
0.05480257049202919,
0.028593624010682106,
0.586491584777832,
0.3434990644454956,
0.09801793098449707,
-0.37161412835121155,
0.3352065682411194,
0.26375046372413635,
-0.1473408341407776,
-0.6114330887794495,
-0.19667954742908478,
0.6845395565032959,
-0.37216100096702576,
0.1551019102334976... | |
could exist.
* Does the iPhone simulator support Bluetooth Low Energy?
* If yes, how can I enable it?
The simulator [does support](http://developer.apple.com/library/ios/#technotes/tn2295/_index.html) Bluetooth Low Energy (4.0) according to this appnote from Apple. The only problem is that even if you have a computer ... | [
0.24679797887802124,
-0.09265895932912827,
0.07710465043783188,
0.43770113587379456,
0.39750978350639343,
-0.23046956956386566,
0.14881066977977753,
-0.08283670246601105,
-0.02991384081542492,
-0.5670934319496155,
-0.11120351403951645,
0.6953954696655273,
-0.1050681471824646,
-0.2292959541... | |
@JoeShaw:
> Unfortunately it appears as though Core Bluetooth support has been dropped from the simulator for iOS 7. Reference: doubleencore.com/2013/09/whats-new-in-bluetooth-le-ios-7. In addition, the linked technote seems to have been removed. | [
0.45387551188468933,
-0.1727285534143448,
0.21663632988929749,
0.2740572690963745,
0.2963261008262634,
-0.04934520274400711,
0.7857897281646729,
0.2836076021194458,
-0.38073161244392395,
-0.4014231264591217,
-0.18560756742954254,
0.5658186078071594,
-0.02266952209174633,
-0.110485620796680... | |
I have two models, User and Image.
```
class User < ActiveRecord::Base
has_many :images,:order => "created_at DESC", :dependent => :destroy, :conditions => "archive = 0"
def destroy
self.archive = 1
self.deleted_at = Time.now
self.save
end
end
class Image < ActiveRecord::Base
belongs_to :user , ... | [
0.12286901473999023,
0.1199609562754631,
0.24559566378593445,
-0.35520079731941223,
-0.07077479362487793,
0.23895862698554993,
0.3591451048851013,
-0.4200192391872406,
0.01094482559710741,
-0.9417364001274109,
0.27154675126075745,
0.8128228783607483,
-0.3880358040332794,
0.2254428565502166... | |
back so that i triggers destroy for Image.
PS: I dont want to use act\_as\_paranoid or some other plugins. I need to trigger dependent=> destroy as I have a very deep complex mapping something like:
User has\_many images,
has\_many comments,
has\_many likes,
has\_many activities
and some more 9 types of mappings ... | [
0.3327443599700928,
-0.005586851853877306,
0.3703189194202423,
-0.07789148390293121,
-0.04424496367573738,
-0.24141207337379456,
0.2912692129611969,
-0.41099774837493896,
-0.16053488850593567,
-0.8959820866584778,
0.008080925792455673,
0.8375996351242065,
-0.5206195712089539,
-0.0551452934... | |
destroy
self.archive = 1
self.deleted_at = Time.now
archive_models!
self.save
freeze
end
def archive_models!
archivable_models.each do |model|
model_name = model.name.pluralize.downcase.to_s
self.send(model_name).each { |m| m.archive! }
end
end
def archivable_models
... | [
0.016585545614361763,
0.34693142771720886,
0.23342984914779663,
-0.10230790078639984,
0.0904068574309349,
0.0046445829793810844,
0.37154820561408997,
-0.6309285163879395,
-0.11728363484144211,
-0.714061975479126,
-0.0698552131652832,
0.5401839017868042,
-0.5922025442123413,
0.3253648281097... | |
"archive = 0", :dependent => :destroy
attr_accessible :name
end
```
This is a **pretty** hack-ish implementation, but it works. If you add a Comment model as described in your post, you'd simply add the has\_many statement to User and include Archivable in the Comment model:
```
class User < ActiveRecord::Base
i... | [
0.1877650022506714,
0.26977118849754333,
0.35672593116760254,
0.03281393274664879,
-0.19683465361595154,
-0.311222106218338,
0.10789289325475693,
-0.3164934813976288,
-0.05265871807932854,
-0.9019612669944763,
-0.24451181292533875,
0.43414926528930664,
-0.38489842414855957,
0.1204376742243... | |
I am loading an XML file then I will display the contents of it depending on their tag, but it seems my Code is not working. Here is my XML
```
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<word>
<threeletter>RIP</threeletter>
<fourletter>PIER</fourletter>
<fiveletter>SPIRE</fiveletter>
<sixletter>SPIDER<... | [
-0.010597004555165768,
0.1492970734834671,
0.7724205851554871,
-0.10288873314857483,
-0.43648040294647217,
0.1835743933916092,
0.1051044911146164,
-0.3586491048336029,
-0.09458528459072113,
-1.0146552324295044,
0.17722873389720917,
0.4985736012458801,
-0.04537272825837135,
-0.2393964976072... | |
"<li>" + $(this).text() + "</li>");
});
}
});
})
```
Both of them are in the same folder.
Your code works for me, using jQuery 1.7.1
Perhaps you don't have universal read access on the xml file? Navigate your browser to your xml file, if it doesn't load, there's your problem. | [
0.07776395976543427,
0.011415749788284302,
0.3333378732204437,
-0.028271615505218506,
0.0554167740046978,
-0.3614986538887024,
0.431104451417923,
-0.011367795057594776,
0.003454464254900813,
-0.8775035738945007,
-0.21770772337913513,
0.7532980442047119,
-0.39496299624443054,
-0.04006822034... | |
If a constant is declared like this
```
const char *http_range;
```
Then how can I write the content or the value of it in a text file? Could you please show me with syntax?
First, that is not "a constant". It's a pointer to constant character data, i.e. a pointer to a read-only string. You can change the pointer,... | [
0.2252415418624878,
-0.03723998740315437,
0.5604219436645508,
-0.12165497243404388,
-0.056892089545726776,
-0.13852612674236298,
0.16230960190296173,
-0.03335079923272133,
-0.15692606568336487,
-0.3094955086708069,
-0.26210224628448486,
0.5671954154968262,
-0.49743300676345825,
0.055289097... | |
double-tagged so I picked C. | [
0.5534605383872986,
0.1586821973323822,
-0.19608624279499054,
-0.08922654390335083,
-0.29492002725601196,
0.3071366548538208,
0.05244294926524162,
0.1219506561756134,
-0.2118760347366333,
-0.345868855714798,
0.28533926606178284,
0.1810857653617859,
-0.36207500100135803,
-0.2235240489244461... | |
```
private static synchronized String[][] map2data(Map<String, Object> map) {
if (map != null) {
String[][] msg_data = (String[][]) map.get("message_data");
return msg_data;
} else {
return null;
}
}
```
My java code of my android project is as below. When I debug it in eclipse, a... | [
0.1336280256509781,
0.18607249855995178,
0.43997427821159363,
-0.40937504172325134,
-0.2425813227891922,
-0.07852523028850555,
0.5716497302055359,
-0.17138861119747162,
-0.02582942694425583,
-0.849757969379425,
-0.19397105276584625,
0.7444367408752441,
-0.567732036113739,
-0.09372820705175... | |
msg_data = (String[][]) map.get("message_data");`, but when I change it to`String a = "a"`, it is still the same. Why?
May it because "static synchronized "or something else?
Looking from your code it never be happen..
Check your `msg_data` in `if statement` may be its **null**. And if you debug it correctly may be yo... | [
-0.017076756805181503,
-0.22969163954257965,
0.6835153698921204,
-0.23534397780895233,
0.05866507440805435,
-0.035023558884859085,
0.7933593392372131,
-0.2752131521701813,
-0.3754342496395111,
-0.7832397818565369,
-0.32058024406433105,
0.6652582287788391,
-0.7773365378379822,
0.32784652709... | |
}
return msg_data;
}
``` | [
-0.23129981756210327,
0.18839849531650543,
-0.08371014893054962,
-0.2680782079696655,
0.33232489228248596,
-0.16395461559295654,
0.15741458535194397,
0.28673383593559265,
0.1276107281446457,
-0.4411417841911316,
-0.37595927715301514,
0.7239561676979065,
-0.3878129720687866,
0.1518958806991... | |
I have a base class `Media` and several derived classes, namely `DVD`, `Book`, etc...
The base class is written as:
```
class Media{
private:
int id;
string title;
int year;
public:
Media(){ id = year = 0; title = ""; }
Media(int _id, string _title, int _year): id(_id), ... | [
0.40286344289779663,
-0.03917224705219269,
0.6698305010795593,
0.10722609609365463,
0.14742211997509003,
-0.10436085611581802,
-0.11723063886165619,
-0.12927024066448212,
0.06977950781583786,
-0.7277743816375732,
-0.44898879528045654,
0.7030928134918213,
-0.028516415506601334,
0.7635549306... | |
void changeID(int newID){ id = newID; }
virtual void print(ostream &out);
};
```
The thing is: without the destructor, GCC gives me a bunch of warnings `class has virtual functions but non-virtual destructor`, but still compiles and my program works fine. Now I want to get rid of those annoying warnings so I ... | [
0.03178439661860466,
-0.10957342386245728,
0.7237051725387573,
-0.21641415357589722,
0.41961899399757385,
0.01737707294523716,
0.28052112460136414,
-0.10118357092142105,
-0.19972620904445648,
-0.6267441511154175,
0.14682358503341675,
0.9613087177276611,
-0.47888118028640747,
0.445441663265... | |
destructor, not only add it.
```
//Media.h
class Media{
//....
virtual ~Media() = 0;
};
//Media.cpp
#include "Media.h"
//....
Media::~Media() {};
```
The reason you get the warnings is that all classes that will be derived from should have a virtual or protected (credit @Steve) destructor, otherwise deletin... | [
0.3920098841190338,
-0.02191222831606865,
0.3744701147079468,
0.09944219887256622,
0.07834269851446152,
-0.1305437982082367,
0.4103333055973053,
-0.18158438801765442,
-0.34530672430992126,
-0.8055117726325989,
-0.35914847254753113,
0.8513559699058533,
-0.4742887318134308,
0.561333239078521... | |
This seems to be a stupid issue. I am trying to configure an Oracle10g database for Spring Batch Job Repository (Spring Batch 2.1.7), I was able to have the tables created using the script available at *org/springframework/batch/core/schema-oracle10g.sql* in core. I also set the property *batch.data.source.init* to *fa... | [
0.42047011852264404,
0.34773772954940796,
0.16086502373218536,
-0.12767353653907776,
0.11588869243860245,
0.10350611805915833,
0.21139486134052277,
-0.12570689618587494,
-0.39928653836250305,
-0.5332378149032593,
0.14787936210632324,
0.22950896620750427,
-0.1709396243095398,
0.373262047767... | |
doing wrong?
```
# For Oracle
batch.jdbc.driver=oracle.jdbc.driver.OracleDriver
batch.jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
batch.jdbc.user=****
batch.jdbc.password=****
batch.schema=****
batch.schema.script=classpath:/org/springframework/batch/core/schema-oracle10g.sql
batch.drop.script=classpath:/org/spring... | [
0.2722828686237335,
0.6158665418624878,
-0.037581220269203186,
-0.08512045443058014,
0.3094298243522644,
0.006355442106723785,
0.4787465035915375,
-0.21854999661445618,
-0.28964683413505554,
-0.04102122038602829,
0.19387632608413696,
0.16513223946094513,
-0.5125024318695068,
0.437866419553... | |
<import resource="classpath:/META-INF/spring/module-context.xml" />
<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
<property name="jobRepository" ref="jobRepository"/>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource... | [
-0.2847655117511749,
0.16039115190505981,
0.12112805992364883,
-0.3146805465221405,
0.024261971935629845,
0.28390613198280334,
0.09733893722295761,
-0.3702412545681,
-0.2765149772167206,
-0.32842135429382324,
-0.37079060077667236,
0.5533718466758728,
-0.18144313991069794,
-0.00126548239495... | |
<property name="tablePrefix" value="BATCH_"/>
<property name="isolationLevelForCreate" value="ISOLATION_DEFAULT"/>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${batch.jdbc.driver}" />
... | [
-0.03275745362043381,
0.3814849555492401,
-0.1770143061876297,
-0.5074830055236816,
-0.09270934015512466,
0.018717950209975243,
0.20135870575904846,
-0.34677839279174805,
-0.08971802890300751,
-0.48688334226608276,
-0.08775315433740616,
0.2836085855960846,
-0.35395345091819763,
0.423038810... | |
enabled="${batch.data.source.init}">
<jdbc:script location="${batch.schema.script}" />
</jdbc:initialize-database>
``` | [
-0.12706507742404938,
0.09944052249193192,
0.2604552209377289,
-0.33389875292778015,
0.13606953620910645,
0.10729900747537613,
0.0895913764834404,
-0.1415463387966156,
-0.18006449937820435,
-0.7349305748939514,
-0.3273661136627197,
0.4370841383934021,
-0.197746142745018,
-0.094592630863189... | |
How can I remove an object from an array?
I wish to remove the object that includes name `Kristian` from `someArray`. For example:
```
someArray = [{name:"Kristian", lines:"2,5,10"},
{name:"John", lines:"1,19,26,96"}];
```
I want to achieve:
```
someArray = [{name:"John", lines:"1,19,26,96"}];
```
You... | [
0.1340188980102539,
-0.11611564457416534,
0.24722662568092346,
-0.1850799024105072,
-0.18652164936065674,
0.15835155546665192,
0.4609859585762024,
-0.2287876009941101,
-0.351563423871994,
-0.36416763067245483,
-0.39181578159332275,
0.09600140154361725,
-0.30955028533935547,
0.2122068852186... | |
1);
```
Or
```
someArray = someArray.slice(0, x).concat(someArray.slice(-x));
```
Reply to the comment of [@chill182](https://stackoverflow.com/users/995721/chill182): you can remove one or more elements from an array using `Array.filter`, or `Array.splice` combined with `Array.findIndex` (see [**MDN**](https://de... | [
0.12833918631076813,
-0.29247578978538513,
0.13705535233020782,
-0.1997765153646469,
-0.19776327908039093,
-0.08165726810693741,
0.5109045505523682,
-0.1389557272195816,
-0.4311985373497009,
-0.332409143447876,
-0.4289919435977936,
0.31152936816215515,
-0.28261369466781616,
0.1157108172774... | |
el => el.name !== "John" )`,
`destructive filter/reassign John removed [someArray2] =`,
format(someArray2));
log(`**someArray2.length after filter ${someArray2.length}`);
// destructive splice /w findIndex Brian remains > someArray3 =
let someArray3 = getArray();
someArray3.splice(someArray3.findIndex(v => v.name... | [
0.19603848457336426,
-0.03148023411631584,
0.38592109084129333,
-0.177756205201149,
-0.29325100779533386,
-0.0714845359325409,
0.9077811241149902,
-0.5080947875976562,
-0.4076992869377136,
-0.27300065755844116,
-0.07694670557975769,
0.4363962709903717,
-0.04675336554646492,
0.2484925389289... | |
indx >= 0 ? 1 : 0)`,
`check findIndex result first [someArray4] = (nothing is removed)`,
format(someArray4));
log(`**someArray4.length (should still be 3) ${someArray4.length}`);
// -- helpers --
function format(obj) {
return JSON.stringify(obj, null, " ");
}
function log(...txt) {
document.querySelector("pr... | [
-0.14791227877140045,
-0.1885482370853424,
0.5960588455200195,
-0.10378342121839523,
-0.015865281224250793,
0.26434287428855896,
0.610378623008728,
-0.03428954258561134,
-0.2965727746486664,
-0.6748276352882385,
-0.5007563233375549,
0.049983322620391846,
-0.16620323061943054,
0.09955323487... | |
I've configured Varnish 3 with Apache and it is running perfectly alright. However i'm unable to get the Client ip logged in Apache logs. I tried a few solutions googling around with no luck. Right now my Apache access log file is logging the server IP instead of client IP addresses.
Here are my configurations for you... | [
0.16335436701774597,
-0.02008521556854248,
1.022848129272461,
-0.2633312940597534,
-0.40326735377311707,
-0.2381620556116104,
0.5642988085746765,
-0.3005444407463074,
-0.15030354261398315,
-0.6216293573379517,
0.28034308552742004,
0.8996024131774902,
-0.054840683937072754,
0.34821507334709... | |
pastebin example, this should actually do the trick:
```
if (req.restarts == 0) {
if (req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}
```
In your vcl\_recv{}. | [
-0.2652164697647095,
-0.226924866437912,
0.4598226547241211,
-0.06682713329792023,
-0.051881372928619385,
-0.03604128956794739,
0.17647609114646912,
0.3028675317764282,
-0.03175228089094162,
-0.6625440716743469,
-0.0903274342417717,
0.4267025589942932,
-0.4146134853363037,
0.41910064220428... | |
In my application there are 2 options to open the app.
One of them is open the app manually and start playing audio stream,
the other is to set an AlarmManager which will start the same activity in a defined time.
I figured out that to suspend the app I should use the AlarmManager.
I need to determine how did the user... | [
0.294321745634079,
0.012652103789150715,
0.5127418637275696,
0.09632984548807144,
-0.1187766045331955,
-0.3929975628852844,
0.3965771198272705,
-0.3450978398323059,
-0.26832443475723267,
-0.3633677661418915,
-0.2333572804927826,
1.0219491720199585,
-0.3713378608226776,
0.10415386408567429,... | |
I need to get the length of filled rows ( filled rows means a rows which contains at least one 1 ) of 2D int array in c#.
For ex..
```
1 1 1 0 1
0 1 1 1 1
1 1 1 1 1
0 0 0 0 0
```
Now the filled rows length=3 and col=4.
That is what i need...
The point is, you don't know that any actual instance of A has such a con... | [
0.024700045585632324,
0.3660328984260559,
0.40573474764823914,
-0.28609219193458557,
-0.17437517642974854,
0.0276327021420002,
0.17207852005958557,
-0.340310662984848,
-0.1798497438430786,
-0.5330455899238586,
0.03529294207692146,
0.47148212790489197,
-0.398363322019577,
-0.011912470683455... | |
you don't know statically. You have to use reflection like in the other answers, but this might of course fail at runtime if A suddenly is instantiated with a type which is either not instantiable (A may be an abstract class, for example!), or does not have the appropriate constructor. If you want to avoid this, you co... | [
0.24805855751037598,
-0.01227521151304245,
-0.048868488520383835,
0.13189353048801422,
-0.1137208491563797,
0.16117796301841736,
0.22802913188934326,
-0.18508540093898773,
-0.013151275925338268,
-0.5311055779457092,
0.12297376245260239,
0.5412945747375488,
-0.5562348961830139,
0.0286933034... | |
I was looking into a solution for opening a page in new tab and then i landed on the CSS-3 property [target-new](http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target-new)
It states that: "If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so:
\*... | [
0.0826612189412117,
0.31496724486351013,
0.4356565475463867,
-0.3503614664077759,
-0.4130551218986511,
-0.08314628154039383,
0.11605031043291092,
-0.26084578037261963,
-0.43162935972213745,
-0.6347248554229736,
0.06613701581954956,
0.20441120862960815,
-0.1632741093635559,
0.36675730347633... | |
this yet.
> Why we don't have a property like `target="_tab"` in html5 specification but had this property as opening a link in new tab doesn't have any direct relation with Presentation?
`target=_blank` is still allowed because of backwards compatibility. Introducing new reserved target values, like `_tab`, wouldn’t... | [
0.10779743641614914,
-0.06144946068525314,
0.6693715453147888,
0.050142135471105576,
0.005339913535863161,
-0.3905966281890869,
0.07723522931337357,
-0.027062105014920235,
-0.26387277245521545,
-0.614051342010498,
-0.16664882004261017,
0.42068567872047424,
-0.16231049597263336,
0.363538622... | |
I want to append more text behind UILabel in iOS.
In other languages, we can add following as:
```
String s += textBox.text;
```
We can use (+=) sign in others languages.
In Objective-C , I don't know how to add into label.
Please help me.
Try out this:
```
label.text = [label.text stringByAppendingString:@"your... | [
0.28671973943710327,
0.1994747817516327,
0.6097429990768433,
-0.21768389642238617,
-0.17804782092571259,
-0.27304816246032715,
0.22785989940166473,
-0.08218736201524734,
0.048274196684360504,
-0.8847311735153198,
-0.008223021402955055,
0.5389870405197144,
-0.20715440809726715,
-0.214616924... | |
I have a standard "class library" project with a set of classes that I use to import in almost all my new projects.
The way I work is creating a new Solution with an empty project, which is my main project, and then I add to the solution the mentioned class library project, this way I can see both projects in the Sol... | [
0.28705406188964844,
-0.1970663070678711,
0.039595529437065125,
0.19968633353710175,
-0.10209265351295471,
-0.04039056599140167,
0.13307249546051025,
0.07932531833648682,
-0.08989662677049637,
-0.944612443447113,
0.0010549199068918824,
0.32880374789237976,
-0.20673605799674988,
0.337427228... | |
cases I use the lib for very small tools that I want to redistribute in a easy and clean why, so I would like to embed the `stdlib.dll` generated from my class library project into my `*.exe` file.
I'm pretty sure there must be a why to do this in my Microsoft Visual Basic 2010 Express but I don't know how.
Any Sugge... | [
0.2337140440940857,
0.259144127368927,
0.25853270292282104,
-0.30046188831329346,
-0.167324498295784,
-0.06369954347610474,
0.004074992146342993,
-0.4092491865158081,
-0.1444672793149948,
-0.7294662594795227,
-0.06536585092544556,
0.4877030551433563,
-0.4580618739128113,
-0.177343010902404... | |
Switch to the **Application** tab and click on the **View Application Events** button.
3. Add this code to the *ApplicationEvents.vb* code that opens.
```
Private Sub AppStart(ByVal sender As Object,
ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
AddHandler AppDomain.C... | [
0.06297656893730164,
0.2651897072792053,
0.7557514309883118,
-0.41626134514808655,
0.16826237738132477,
0.38641539216041565,
0.4882919192314148,
-0.23845936357975006,
-0.17473211884498596,
-0.8747243285179138,
-0.4089665710926056,
0.40007442235946655,
-0.4167935848236084,
0.363133728504180... | |
End If
End Function
```
4. Now compile your project and you'll have the dependent assembly incorporated into the output as a single file.
Note that sometimes you may have the dependent assembly in the output folder. This is because VS is preconfigured to copy all dependent assemblies to the output path. You can over... | [
0.5329459309577942,
-0.03468233719468117,
0.37704935669898987,
-0.13159982860088348,
0.007698489353060722,
-0.259843647480011,
0.38364461064338684,
-0.17296889424324036,
0.00506862485781312,
-0.5625360608100891,
-0.22371825575828552,
0.5164247155189514,
-0.3888423442840576,
0.3872002959251... | |
I want to register user script globally, to be available all over the site. Now I insert in every action in my controllers:
```
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/script.js');
```
But really I understand that it's not good way...
If you are looking forward to use themes in your p... | [
0.17802834510803223,
-0.027774855494499207,
0.6287915110588074,
0.19157417118549347,
-0.27417880296707153,
-0.09072159230709076,
-0.19623836874961853,
-0.10595657676458359,
-0.4072973132133484,
-0.6580802202224731,
0.06408330053091049,
0.08626878261566162,
-0.2132934331893921,
0.1601659804... | |
would extend this class Controller
```
class PageController extends Controller {
```
And so if all your controllers using on parent class, you can edit just parent class and add something like this
```
public function beforeRender( $view ) {
...
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseU... | [
-0.07637520879507065,
-0.4017772078514099,
1.0223596096038818,
0.21260882914066315,
-0.25781142711639404,
-0.01996063068509102,
0.047474540770053864,
-0.2983129918575287,
-0.24267417192459106,
-0.7470480799674988,
0.039819054305553436,
0.4968072772026062,
-0.3637329041957855,
0.21930100023... | |
I have the below xpath expression
```
//div[@class="post-content"]//img
```
which runs on a html page, scanning for images.
The above query returns a lot of images but I only want the second in the list.
I have tried these with no luck:
```
//div[@class="post-content"]//img[1] and
//div[@class="post-content"]//img... | [
0.006984340026974678,
0.23078040778636932,
0.527853786945343,
-0.17748461663722992,
-0.3141845166683197,
0.10354828834533691,
0.25698885321617126,
-0.20064684748649597,
0.06290052831172943,
-0.8405399322509766,
-0.09248889237642288,
0.44495901465415955,
-0.22027619183063507,
0.023666892200... | |
I have a very large and bloated class and I want to split it into separate files, but it should be completely transparent to the user and compatible with existing projects that use the class.
In particular, I have my own `ImageMatrix` class and it defines a ton of unary functions, a ton of binary functions with a sca... | [
0.3972674608230591,
-0.04706086218357086,
0.04078968986868858,
0.21741364896297455,
-0.041840810328722,
-0.041000641882419586,
-0.005341681186109781,
-0.04402986168861389,
-0.2173469513654709,
-0.39486822485923767,
0.053444262593984604,
0.4395780861377716,
-0.3689609467983246,
0.2112015336... | |
them in the source?
So I wish that I can still do this, but the methods actually reside in different files:
```
ImageMatrix img = new ImageMatrix(800, 600, 3);
img.clear(0.5f, 0.0f, 0,0f);
img.addSelf(anotherImg);
img.normalize();
img.abs();
img.addSelf(0.5);
```
Each method is around 15-30 ... | [
0.35970473289489746,
-0.033194590359926224,
0.794679582118988,
0.11235342174768448,
-0.03591363504528999,
0.24668516218662262,
0.04487137869000435,
-0.26069679856300354,
-0.0860595628619194,
-0.7718687653541565,
-0.10903972387313843,
0.4379050135612488,
-0.4215331971645355,
-0.073776505887... | |
I add a function or if I change global behavior (like error checking), I can easily keep things coherent.
You can also use delegate methods. This means the definitions of your methods are still in `ImageMatrix`, but they are implemented in another class. Depending on the complexity of your methods this could reduce the... | [
0.3196037709712982,
-0.14480610191822052,
0.49132174253463745,
-0.12178787589073181,
-0.0039149075746536255,
0.19765698909759521,
0.02675403468310833,
-0.5795400738716125,
-0.1745089888572693,
-0.6457633376121521,
-0.007403234485536814,
0.751449704170227,
-0.7692290544509888,
0.06881259381... | |
I'm currently experimenting with the sample SoftKeyboard on my tablet (Android 3.2).
When I open the Google mail app and set the focus to the *recipient* field, the textfield is expanded to fill the available space above the keyboard.

This loo... | [
0.08341032266616821,
-0.06411586701869965,
0.3885778784751892,
-0.19878540933132172,
-0.11384421586990356,
0.42319440841674805,
-0.09220171719789505,
0.0907764881849289,
0.008403312414884567,
-0.8366023302078247,
0.0822727382183075,
0.4822041988372803,
-0.17442521452903748,
-0.143402829766... | |
that the stock softkeyboard manages to prevent this, as shown below:

* also sometimes the textcolor in the input box is set to white (probably some adjustment due to daytime/nighttime?). White on white is more or less unreadable.
So my question... | [
0.0750572681427002,
0.030894771218299866,
0.024965686723589897,
-0.04940520226955414,
0.21450906991958618,
0.1088068038225174,
0.04408903047442436,
0.20467956364154816,
-0.3207005262374878,
-0.5735872983932495,
0.036975495517253876,
0.5847189426422119,
-0.15243463218212128,
0.1048310473561... | |
looking for a full implementation of an Android keyboard, check out AnySoftKeyboard's source code or the AOSP source code.
To get rid of fullscreen, I know part of the issue lies in the `onComputeInsets()` function. Like I said though, I'd base your code off full Android keyboard (i.e. AOSP or Cyanogenmod) rather than... | [
0.2771473228931427,
0.08576125651597977,
0.17869241535663605,
0.046817418187856674,
0.1278028041124344,
0.02611514925956726,
0.39354294538497925,
0.5040209293365479,
-0.12639673054218292,
-1.0110470056533813,
-0.15814733505249023,
0.6815862655639648,
-0.2037300318479538,
-0.096475102007389... | |
I've got legacy code sample which uses JFreeChart and XYPlot. Now i'm making i18n for that code and most of non-english strings are much longer then english ones. I googled for a way to wrap strings. No success. Help please!
Multiple lines are [not supported](http://jfree.org/phpBB2/viewtopic.php?f=3&t=4558). The `setV... | [
0.5282931327819824,
-0.20539914071559906,
0.4008499085903168,
-0.05581413209438324,
-0.07670002430677414,
-0.019002575427293777,
0.611615002155304,
-0.19711489975452423,
-0.08721906691789627,
-0.39460039138793945,
-0.22767946124076843,
0.46411556005477905,
-0.371645987033844,
-0.0176708567... | |
Pass a []byte into a template as the body of a message post on a forum-style web app. In the template, call a method to convert to string and along the way, switch out all newlines for line breaks:
```
<p>{{.BodyString}}</p>
```
...
```
func (p *Post) BodyString() string {
nl := regexp.MustCompile(`\n`)
ret... | [
0.3008953630924225,
0.05153808370232582,
0.4874037206172943,
-0.04151131957769394,
-0.2321244180202484,
-0.14860472083091736,
0.14327476918697357,
-0.30567988753318787,
-0.27184170484542847,
-0.6633926033973694,
-0.30966755747795105,
0.008291885256767273,
-0.5134677290916443,
-0.0801944583... | |
vanilla Go1 template package?
I do think you want to parse the HTML. The HTML parser in exp/html was deemed incomplete and so removed from Go 1, although the exp tree is still in the Go source tree and can be accessed by weekly tag, for example. I don't know exactly what is incomplete. I used it for a simple task once ... | [
0.12680675089359283,
-0.304437518119812,
0.12825332581996918,
-0.047319184988737106,
-0.47972995042800903,
-0.03593122959136963,
0.3251751661300659,
0.010714839212596416,
-0.13806869089603424,
-0.30372583866119385,
0.17000840604305267,
0.4547185003757477,
-0.5001493096351624,
-0.2215026766... | |
Ive a project close to doing everything I need it to do. Its got a Main page which has four buttons that allow you to choose an option. Then a tableview page is launched from those options and displays a parsed XML feed from a website. You can then select one of the options in the table to see a detail view of the item... | [
0.2543988525867462,
-0.16737855970859528,
0.8297768831253052,
0.09489601850509644,
-0.15462593734264374,
-0.06576191633939743,
-0.18080773949623108,
-0.08595196902751923,
-0.20748429000377655,
-0.5099194645881653,
0.16251692175865173,
0.5753625631332397,
-0.08056973665952682,
0.24572446942... | |
images, etc.
In the TableViewController xib, the tableview itself fills the page. I cant resize it to add more elements above it. I can add a 'view' window seemingly above the tableview and put things in it. But it seems to add the view to the tableview. This means that when I scroll the table, the other elements like... | [
-0.10079710185527802,
0.17335344851016998,
0.833638608455658,
0.03938755765557289,
-0.30376461148262024,
0.08580606430768967,
-0.2514282464981079,
0.012225145474076271,
-0.29695266485214233,
-0.9836128354072571,
0.06335458904504776,
0.3400118350982666,
-0.2941562533378601,
-0.0226043667644... | |
that the right way to go? But if thats the case, then how do I instantiate the tableviewcontroller within code? Because my page will not be of that type anymore - it will be just a viewcontroller. But in code Im making a tableviewcontroller .. slightly scared by that route tbh.
Any illumination on this would be much a... | [
0.19234122335910797,
-0.24001836776733398,
0.4815646708011627,
0.3296893835067749,
-0.25566667318344116,
-0.22737354040145874,
0.15327300131320953,
0.09363020211458206,
-0.16899877786636353,
-0.8334431648254395,
0.04340118169784546,
0.5534771084785461,
0.053368743509054184,
0.0923278853297... | |
controller, create the table view, set its delegate, data source, and any other properties you wish and add it as a subview to your view.
```
tableView = [[[UITableView alloc] init] autorelease];
tableView.delegate = self;
tableView.dataSource = self;
// .. Other customization
[self.view addSubview:tableView];
```
I... | [
-0.07871431857347488,
-0.43155357241630554,
0.5661361813545227,
0.3424278795719147,
-0.14188575744628906,
-0.20020341873168945,
-0.40613821148872375,
-0.1327439248561859,
-0.38979417085647583,
-0.6715094447135925,
-0.059884656220674515,
0.5364911556243896,
-0.2808404266834259,
0.2411167770... | |
Which is the fast way to write text file in java?
At the moment i use this way to write a text file:
```
FileOutputStream fos = new FileOutputStream('FileName');
DataOutputStream dos = new DataOutputStream(fos);
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(dos, Charset.forN... | [
-0.08226379752159119,
-0.17406542599201202,
0.7496334910392761,
-0.19980594515800476,
0.21467000246047974,
0.04472769796848297,
0.0963420420885086,
-0.5251721143722534,
-0.18386787176132202,
-0.7936339974403381,
0.15870259702205658,
0.7987691760063171,
-0.02556929737329483,
-0.283032774925... | |
I need to embed powerpoint viewer with my setup in vs 2010.
When user run setup created by me, powerpoint viewer setup get automatically launch during installation.
thanks
Add Installer Class to your development
```
namespace CLT
{
[RunInstaller(true)]
public partial class ClientInstall : Installer
{
... | [
0.33506518602371216,
-0.11995284259319305,
0.4999734163284302,
-0.05385756120085716,
0.15738452970981598,
-0.11873258650302887,
0.25602999329566956,
-0.32233887910842896,
0.08033192902803421,
-0.9734753966331482,
-0.29038146138191223,
0.761540412902832,
-0.3547976315021515,
0.0213136840611... | |
{
base.Install(stateSaver);
System.Diagnostics.Process.Start(@"\Powerpoint.exe");
}
}
```
And remember to add Custom actions to your setup
 | [
0.48612454533576965,
-0.08813296258449554,
0.44611793756484985,
-0.12183910608291626,
0.47417572140693665,
-0.08280517160892487,
0.3183269202709198,
-0.31954655051231384,
-0.41550612449645996,
-0.7187154293060303,
-0.2772095203399658,
0.6296492218971252,
-0.2752068042755127,
-0.15689840912... | |
I tried to confirm whether an email address is a valid Lync User by the follow methods but it is not giving proper results.
```
LyncClient client = LyncClient.GetClient();
Contact contact = client.ContactManager.GetContactByUri("xxx@xxx.com");
```
**Method1:**
```
if(contact.UnifiedCommunicationType == UnifiedComm... | [
-0.0853409543633461,
0.15160655975341797,
0.5934043526649475,
-0.21398285031318665,
0.01844269223511219,
-0.030571509152650833,
0.2802717089653015,
-0.3414413034915924,
-0.03604669123888016,
-0.5994569659233093,
-0.030826309695839882,
0.41109493374824524,
-0.30486035346984863,
0.2404903322... | |
ContactType.Unknown)
{
}
```
In this method, I am getting "Person" regardless of the emailaddress. Hence, I dont this this is the way.
Can you please advice me how to achieve this?
> Note: All I want to do is to check if an incoming email's sender in
> outlook is a valid lync user or not.
Finally, I found the way ... | [
-0.20827583968639374,
0.048953935503959656,
0.7068206667900085,
-0.011498714797198772,
0.14346835017204285,
-0.3257482349872589,
0.2419673651456833,
0.007230686955153942,
-0.0595877505838871,
-0.5490679740905762,
0.11762721091508865,
0.4641386568546295,
-0.18617288768291473,
0.183659210801... | |
EDIT: My main code no longer works, should this function work?
```
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script>
var second_choice = $('#second-choice').val();
$("#first-choice").change(function() {
$("$second-choice").load("findModel.php?choice=" + $("#first-choice").val());
});
</script>
... | [
0.08274233341217041,
0.12423770874738693,
0.7186044454574585,
-0.0866040512919426,
0.16262684762477875,
0.3127317726612091,
0.14206162095069885,
-0.46681004762649536,
-0.15018415451049805,
-0.4238990843296051,
0.03148556128144264,
0.6994426250457764,
-0.29721304774284363,
0.255386173725128... | |
which then fills the second with options which I can choose from. However when I post the form, it doesn't take the second dropdown selected value through it's just empty but it does take the first dropdown value selected value.
Any reason why?
The problem is that the second select tag does not have name attribute. if... | [
-0.014154631644487381,
-0.6792840957641602,
0.1755950152873993,
0.17931047081947327,
-0.12077860534191132,
-0.03081444650888443,
0.007246222347021103,
-0.023840347304940224,
-0.011532561853528023,
-1.0253620147705078,
-0.21381999552249908,
0.542238712310791,
-0.15667453408241272,
0.0790403... | |
I'm having a problem and can't seem to find the solution..
```
int linearSearch(nodeptr list,char search){
int pos =0;
if(list==NULL)
return -1;
while(list->info!=search && list!=NULL){
pos++;
list=list->next;
}
if(list==NULL)
return -1;
else
return pos;... | [
-0.5558239817619324,
-0.044920869171619415,
0.42899125814437866,
-0.21274937689304352,
0.1923919916152954,
-0.02980160154402256,
0.6017962098121643,
-0.12200210988521576,
-0.15661892294883728,
-0.4172232449054718,
-0.35569584369659424,
0.4932786822319031,
-0.5268474221229553,
0.13124071061... | |
as **[Short-circuit evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation).**
When you use `&&` the first expression is guaranteed to be executed before the second **for inbuilt primitive types**[#1].
In your case the dereferencing happens before the `NULL`check, So when `list == NULL`, You will end up... | [
0.12255385518074036,
-0.27386003732681274,
0.40482407808303833,
-0.12271609157323837,
0.15966613590717316,
-0.2956765592098236,
0.6298261880874634,
-0.43779096007347107,
-0.26661479473114014,
-0.2832663059234619,
-0.6117232441902161,
0.578058660030365,
-0.393873393535614,
0.071867264807224... | |
> using the built-in meaning of the operators in these expressions, there is a sequence point after the evaluation of the first expression (12). | [
0.10641752183437347,
-0.05748468637466431,
0.20026275515556335,
-0.018957341089844704,
0.09957665950059891,
0.01931242272257805,
0.644722580909729,
-0.5251739025115967,
0.33759334683418274,
-0.5160080790519714,
-0.3625042736530304,
0.5911394953727722,
-0.09281990677118301,
-0.4413014054298... | |
I'm running a program to list info of all files stored in folder.
I want to obtain properties of a file (the most important for me is file size, but i would like to get also other properties, like date of modification, etc.).
My problem is when I get to the file which is actually used by another program, I can't get ... | [
0.32344990968704224,
0.32711294293403625,
0.1035042479634285,
0.04084049537777901,
0.08960536122322083,
-0.18451625108718872,
0.18222223222255707,
0.04021067172288895,
-0.22754710912704468,
-0.6065241694450378,
-0.0061234720051288605,
0.4172602891921997,
-0.15799479186534882,
0.55001276731... | |
use any extra libraries, to keep small size of the application.
App is based on java JRE7.
I'm using `java.nio.file.SimpleFileVisitor` to visit all the files.
Here is fragment of my code, where I got the error:
```
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc){
FileInfo temp=new Fi... | [
-0.08877017349004745,
-0.018502840772271156,
0.8927441239356995,
-0.1293046474456787,
0.2013888955116272,
0.1015261635184288,
0.687351644039154,
-0.6106481552124023,
-0.25838184356689453,
-1.0273470878601074,
-0.3713754415512085,
0.7786957621574402,
-0.6261495351791382,
-0.1566998362541198... | |
System.out.println("exists");
if(fis.isFile())
System.out.println("isFile");
System.out.println(file.toAbsolutePath().toString());
temp.fSize=new BigInteger(new Long(fis.length()).toString());
} catch(Exception e){
e.printStackTrace();
}
node... | [
-0.037332404404878616,
-0.6403970122337341,
0.6701670289039612,
-0.21757549047470093,
0.4819202125072479,
0.14684104919433594,
0.5314649343490601,
-0.4550778865814209,
-0.3742980360984802,
-0.5737321972846985,
-0.48699912428855896,
0.3246316909790039,
-0.4657672643661499,
0.197543412446975... | |
}
```
If the method [java.io.File.exists()](http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#exists%28%29) returns false, and the file `C:\pagefile.sys` exists in your file system, you specified the incorrect file path then.
The following code works on my machine:
```
package q10025482;
import java.io... | [
0.44800958037376404,
0.4381473958492279,
0.20794248580932617,
-0.37774452567100525,
0.40532079339027405,
-0.026376038789749146,
0.5700241923332214,
-0.37095907330513,
0.13529331982135773,
-0.5419751405715942,
-0.21576038002967834,
0.6163346767425537,
-0.5288960337638855,
0.2079410403966903... | |
System.out.println("Is file: " + file.isFile());
System.out.println("Is dir: " + file.isDirectory());
System.out.println("Length: " + file.length());
System.out.println();
}
}
```
Here is the result output:
```
File C:\System Volume Information info:
Exists: true
Is file: false
Is dir: tr... | [
-0.5074483156204224,
0.09530024230480194,
0.7771438360214233,
-0.2585213780403137,
0.3659909665584564,
0.10720547288656235,
-0.065376877784729,
-0.4243309199810028,
-0.44319355487823486,
-0.49693727493286133,
-0.49469271302223206,
0.48887696862220764,
-0.039839472621679306,
0.4946390092372... | |
I have a site search (using Examine & Razor) that breaks if a space character is the first or last (or both) character in a search query. For example "hello" & "hello world" both work fine, but " hello" & "hello " don't. Is it possible to remove any spaces such as these before the input field is submitted using JS/JQue... | [
0.28555962443351746,
-0.07969748228788376,
0.23330268263816833,
0.05758178234100342,
0.016579952090978622,
0.061861228197813034,
-0.15433883666992188,
-0.21902018785476685,
-0.11353225260972977,
-0.815983235836029,
-0.07177122682332993,
0.2561030089855194,
0.10896114259958267,
0.2360375225... | |
If I have code such as
```
class CString { int GetLength(); };
bool smaller(CString s1, std::string s2) {
return s2.size() > s1.GetLength();
}
```
What is the best thing for me to do?
* Change `s1.GetLength()` to `(size_t)c.GetLength()`?
This would get help get rid of a compiler warning regarding "signed-un... | [
0.1788749396800995,
0.030963396653532982,
0.30820006132125854,
-0.2685288190841675,
0.15003469586372375,
-0.20065705478191376,
0.5390390157699585,
-0.39395350217819214,
0.033545881509780884,
-0.48626506328582764,
-0.23665422201156616,
0.7034034132957458,
-0.18786175549030304,
0.09181868284... | |
benefit to this abstraction, or should I break it?
* Leave it as is?
This would help make the compiler do overflow-checking using the **`/RTCc` switch** (my main concern here), at the expense of a warning.
* Do something else?
Should I make my own casting function? Use a macro? Should I check at run-time as well ... | [
0.5370134711265564,
0.10830418020486832,
0.11491768807172775,
-0.0430804081261158,
-0.14630025625228882,
-0.21178235113620758,
0.1638059914112091,
-0.051158297806978226,
-0.28874775767326355,
-0.5269356966018677,
0.1142512783408165,
0.7584378719329834,
-0.0870983824133873,
-0.0343588702380... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.