text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
private System.ComponentModel.IContainer components = null;
```
c) Unless you had a *specific* dispose method, this is the standard. If you don't have any form Inheritance, I think that base.Dispose can be safety removed:
```
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <pa... | [
0.5344034433364868,
-0.19606445729732513,
0.13581500947475433,
-0.017171667888760567,
0.24853773415088654,
-0.10658109188079834,
0.26817914843559265,
-0.6015335917472839,
-0.4014131426811218,
-0.3928286135196686,
-0.19726887345314026,
0.567486584186554,
-0.44158822298049927,
0.450476974248... | |
{
components.Dispose();
}
base.Dispose( disposing );
}
```
d) Copy **all** the code inside the **#region Windows Form Designer generated code** to the new Designer.cs class.
e) You should also copy **all** the member variables for all your objects (labels, texboxes, etc. that you use... | [
0.3443717062473297,
-0.02181362546980381,
0.31594881415367126,
-0.012930565513670444,
0.07885260879993439,
-0.2771822512149811,
0.2034766525030136,
-0.3956858813762665,
-0.2175171971321106,
-0.9898589849472046,
-0.1529359519481659,
0.5251009464263916,
-0.3795633316040039,
0.356757402420043... | |
all must share the SAME namespace.
----------------------------------------------------------------------------------------------------------
Is it worthwhile?
Well, in my case, I had a bunch of **huge** winforms with tons of code and controls. VS2008 crawled every time I switched from/to designer. This made the code ... | [
0.02638421766459942,
-0.18765032291412354,
0.6068693995475769,
0.308209627866745,
-0.09262615442276001,
0.08965537697076797,
0.4050515294075012,
0.13458152115345,
-0.39376604557037354,
-0.9861442446708679,
-0.05089343339204788,
0.22258912026882172,
0.046730946749448776,
0.2966141402721405,... | |
the file (after you have added/created the partial class) for VS to draw correctly in the Designer; failure to do may result in empty forms being drawn. | [
0.296337366104126,
-0.29578590393066406,
0.2791307270526886,
0.1841384917497635,
0.05648677796125412,
-0.10645242035388947,
0.3557240962982178,
-0.1238735243678093,
0.10581730306148529,
-0.924923837184906,
-0.4074532985687256,
0.4847865402698517,
0.03376207873225212,
0.018146300688385963,
... | |
Okay so I have a Window in WPF. I add the following line inside of it:
```
xmlns:controls="clr-namespace:mCubed.Controls"
```
This compiles and runs just fine, but the Visual Studio designer gives me this error:
> Could not load file or assembly 'mCubed, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one... | [
0.4372539520263672,
0.27238282561302185,
0.41684821248054504,
-0.07920151948928833,
-0.02549351379275322,
-0.29383695125579834,
0.30437877774238586,
-0.24416425824165344,
-0.21361958980560303,
-0.6663057804107666,
-0.08151790499687195,
0.4637795686721802,
-0.3466283082962036,
0.15973903238... | |
document.
```
<controls:MyControl/>
```
All my .cs files are in the same VS project. I have a mCubed namespace which contains my cleverly named mCubedWindow class. I have all my controls classes defined in the mCubed.Controls namespace. Do NOT tell me this is an assembly problem, ALL MY FILES ARE IN THE SAME VS PROJ... | [
0.14356230199337006,
0.13260331749916077,
0.7701959609985352,
0.15579454600811005,
-0.3687628507614136,
-0.39360591769218445,
0.3549472689628601,
-0.2030545324087143,
-0.43016812205314636,
-0.8817315697669983,
0.049828652292490005,
0.6150051951408386,
-0.18424390256404877,
0.30888298153877... | |
Does anyone have good suggestions for displaying "max length exceeded" errors to a user when a single character doesn't equal one byte?
I'm at a loss for words, but I found [a quote that's more eloquent](http://www.inter-locale.com/demos/countBytes.html):
> If the buffer runs over by three bytes, what do you tell the... | [
0.3387867212295532,
-0.09370378404855728,
0.2026536613702774,
0.05776253715157509,
0.13025034964084625,
0.3057323694229126,
0.16046518087387085,
-0.04040006920695305,
-0.45776936411857605,
-0.43418067693710327,
0.07946588099002838,
0.35016536712646484,
0.22405119240283966,
-0.0613860972225... | |
they might delete too many characters without realizing it. Finally, if the buffer limit is small (like 10 or 20), some languages like Chinese will be severely restricted on the number of characters permitted.
A couple of constraints I'm under is that its a form-driven website and the underlying database columns sizes... | [
-0.0882108211517334,
0.172362819314003,
0.18814745545387268,
-0.04260816052556038,
-0.06134643033146858,
0.0805845558643341,
0.28761762380599976,
0.33258143067359924,
-0.2556523382663727,
-0.5909255743026733,
-0.11226828396320343,
0.2384408414363861,
0.15891055762767792,
-0.249383687973022... | |
get into the specifics of how many bytes or characters it was.
If you can use Javascript (for example, if you don't need to meet 508 standards), I also like monitoring the length of the field and alerting the user when it's too long (while still doing server-side validation, of course).
If you don't want to get into ... | [
0.5737747550010681,
-0.015962980687618256,
-0.19241099059581757,
0.16383439302444458,
-0.15514066815376282,
0.030936971306800842,
-0.000024261400540126488,
0.358810156583786,
-0.25366681814193726,
-0.5675092935562134,
0.2615138292312622,
0.4230760335922241,
0.09611327201128006,
-0.17002840... | |
When you create a Setup project for a Windows/Console application, you find that there are two outputs.
1. Setup.exe
2. .msi
What does setup.exe and *.MSI* do? Which one should be used for installation?
I have seen that I can install the application using both. But Setup.exe is fairly small file compared to the *.MS... | [
0.9694805145263672,
-0.34333935379981995,
-0.024173004552721977,
-0.006392338313162327,
-0.179330974817276,
-0.18946978449821472,
-0.14161993563175201,
-0.31555798649787903,
-0.12827251851558685,
-1.0839579105377197,
0.1003282219171524,
0.6693786978721619,
-0.5463750958442688,
-0.008753601... | |
correct?
3. I couldn't test for the unavailability of .NET framework because I'm a .NET developer and also my team works on .NET and have .NET installed. I didn't want to risk the Visual Studio by uninstalling the .NET framework and testing the setup application.
How does it install .NET framework? It is 200 MB odd, b... | [
0.29696381092071533,
0.11680635809898376,
0.3006470501422882,
0.21771231293678284,
-0.13153421878814697,
-0.26253005862236023,
0.5462424159049988,
-0.347500205039978,
-0.0009352497872896492,
-0.6631085276603699,
0.10554032772779465,
0.8035991787910461,
-0.3574633300304413,
-0.2353112399578... | |
it is also the setup.exe that will allow download of the right version of the .NET framework.
You can use the .MSI on its own, you can't use just the setup.exe.
You are correct that the setup allows the download of the correct version of .NET framework.
There are ways to merge the MSI and the Setup.exe to create a si... | [
0.7072239518165588,
-0.2587027847766876,
0.2760402262210846,
0.3399677574634552,
-0.1545133739709854,
-0.5240007638931274,
0.021482214331626892,
-0.0716676265001297,
-0.20739763975143433,
-1.06026291847229,
-0.15689919888973236,
0.8105055093765259,
-0.4253692328929901,
-0.02886584773659706... | |
Can someone explain why this doesn't work like I think it should.
```
double[] numbers1 = { 2.0, 2.1, 2.2, 2.3, 2.3, 2.3, 2.4, 2.5 };
double[] numbers2 = { 2.2 };
IEnumerable<double> onlyInFirstSet = numbers1.Except(numbers2);
foreach (double number in onlyInFirstSet)
Console.WriteLine(number);
/*
This code pr... | [
0.26019614934921265,
0.08885624259710312,
0.3558441698551178,
-0.04474804550409317,
0.07339345663785934,
0.11164453625679016,
0.4727439284324646,
-0.11817829310894012,
-0.24530264735221863,
-0.5285967588424683,
-0.1350736916065216,
0.49497899413108826,
-0.44110703468322754,
-0.107330702245... | |
it first.:)
> Why would except return a distinct list? Is this a bug?
Nope. `Except` produces a **set difference**. See the [documentation](http://msdn.microsoft.com/en-us/library/bb300779.aspx):
> Produces the set difference of two sequences by using the default equality comparer to compare values.
To do what you w... | [
0.32857999205589294,
-0.35877472162246704,
0.28124234080314636,
-0.19534945487976074,
-0.09544423222541809,
-0.05035798251628876,
0.10092048346996307,
-0.595488429069519,
0.1140238419175148,
-0.6654626131057739,
-0.14181169867515564,
0.4324639141559601,
-0.7011620402336121,
0.1381870508193... | |
I was experimenting with C++ and found the below code as very strange.
```
class Foo{
public:
virtual void say_virtual_hi(){
std::cout << "Virtual Hi";
}
void say_hi()
{
std::cout << "Hi";
}
};
int main(int argc, char** argv)
{
Foo* foo = 0;
foo->say_hi(); // works well
... | [
0.0200505293905735,
0.32029733061790466,
0.7196005582809448,
-0.20012062788009644,
0.18020300567150116,
-0.015481311827898026,
0.3101116418838501,
-0.11231725662946701,
0.06860064715147018,
-0.46035829186439514,
-0.3066415786743164,
0.7864868640899658,
-0.5260950922966003,
0.26747584342956... | |
requires a vtable lookup and can only work with valid objects.
I have the following questions
1. How does the non virtual method `say_hi` work on a NULL pointer?
2. Where does the object `foo` get allocated?
Any thoughts?
The object `foo` is a local variable with type `Foo*`. That variable likely gets allocated on... | [
-0.03322261571884155,
0.1091017797589302,
0.28484246134757996,
0.21464024484157562,
0.07947429269552231,
0.17810183763504028,
0.21295233070850372,
-0.042487189173698425,
-0.06625612080097198,
-0.5405154824256897,
0.023539932444691658,
0.5287349820137024,
-0.3995557129383087,
0.275237917900... | |
is being called on. That's because the object itself is what tells which function should really be called. (That's frequently implemented by giving the object a pointer to a vtable, a list of function-pointers, and the caller just knows it's supposed to call the first function on the list, without knowing in advance wh... | [
0.2492130547761917,
-0.0949186235666275,
0.2721726596355438,
0.046795666217803955,
0.21142858266830444,
0.10911266505718231,
0.075205959379673,
0.12188251316547394,
-0.18151849508285522,
-0.318243145942688,
-0.575556755065918,
0.8603579998016357,
-0.5047638416290283,
-0.006528626196086407,... | |
the object the function was called on as a hidden parameter to the function. In other words, the compiler translates your function call into this:
```
void Foo_say_hi(Foo* this);
Foo_say_hi(foo);
```
Now, since the implementation of that function never makes reference to any members of the object pointed to by its ... | [
-0.07834542542695999,
0.19893431663513184,
0.20491349697113037,
-0.21662046015262604,
-0.10468184947967529,
-0.01102176122367382,
0.497506707906723,
0.029940446838736534,
-0.014089060947299004,
-0.3303482234477997,
-0.38317495584487915,
0.6178692579269409,
-0.5775486826896667,
0.3062209486... | |
rely on that, although you will sometimes find libraries from your compiler vendor that *do* rely on that. But the compiler vendor has the advantage of being able to add further definition to what would otherwise be undefined behavior. Don't do it yourself. | [
0.6930317282676697,
0.13976000249385834,
-0.555316150188446,
0.30094802379608154,
-0.16456429660320282,
-0.3745519518852234,
0.7199245095252991,
0.04777522012591362,
-0.07731758058071136,
-0.33974596858024597,
-0.049718815833330154,
0.7114197015762329,
-0.45154425501823425,
-0.385865479707... | |
I am trying to setup windows server 2008 smtp server to relay emails to gmail smtp. Everything appears to be setup but it is not sending emails. Could you please help me figure out whats wrong.
Below is the setup:
* Windows server 2008 with SMTP server
feature installed. Need SMTP server
to forward all messages to gm... | [
0.13235747814178467,
0.23296086490154266,
0.417642742395401,
-0.1588449627161026,
-0.40108057856559753,
-0.17044119536876678,
0.7012509703636169,
0.09847928583621979,
-0.25683215260505676,
-0.7609182000160217,
0.08043665438890457,
0.31326091289520264,
-0.2037481963634491,
0.329097509384155... | |
= **mydomain.com**
* smart host = **smtp.gmail.com**
* TCP Port = **587**
* Out Bound Security = **Basic Authentication(my username password for google apps email account)**
* In domains list under virtual smtp server. I have one default domain that's server dns. I added another one for my domain name.
With above setu... | [
0.16534899175167084,
0.019182872027158737,
1.1078405380249023,
-0.1743365079164505,
-0.26816555857658386,
-0.2243766039609909,
0.5550341606140137,
0.028140882030129433,
-0.12277558445930481,
-0.8189252614974976,
0.056671056896448135,
0.41005939245224,
-0.05139695107936859,
0.35536375641822... | |
web application but never sends an email.**
**I can see that it adds those emails in queue folder but it stays there forever.**
**When i try to send emails from web app to above server it rejects if To address is other than my domain.(Am i missing something in list of domains)**
Thanks for all answers, finally found ... | [
0.07509157806634903,
0.0543985553085804,
0.8631300926208496,
0.11370600759983063,
-0.31190356612205505,
-0.24023443460464478,
0.7627077102661133,
0.17647890746593475,
-0.4133029282093048,
-0.6777840852737427,
-0.007749163545668125,
0.384797066450119,
-0.056285250931978226,
0.33946275711059... | |
I have to create a name-value list in HTML. (Actually they are form elements, `label` and `input`)
How do I build this output so that a web designer can create the following three different layouts without changing the original HTML structure?
Variant 1:
```
Name One:
Value One
Name Two:
Value Two
```
Variant 2:... | [
0.15035785734653473,
-0.0557885579764843,
0.6275731325149536,
-0.19196876883506775,
-0.4718211889266968,
0.07372043281793594,
0.1267625242471695,
-0.5245136618614197,
-0.20875295996665955,
-0.6616405248641968,
-0.004987871274352074,
0.30308589339256287,
-0.4980105757713318,
-0.208429008722... | |
changed with CSS.
But how do I do it when I want to allow all three variants? How would the CSS code look like? Is it even possible?
I would use a DL list, eg:
```
<dl>
<dt>Name One:</dt>
<dd>Value One</dd>
<dt>Name Two:</dt>
<dd>Value Two</dd>
<dt>Name Three:</dt>
<dd>Value Three</dd>
</dl>
```
a... | [
0.08539622277021408,
-0.2322305291891098,
0.740801215171814,
-0.249455988407135,
-0.24872751533985138,
0.3148636221885681,
-0.1378711760044098,
-0.4135783910751343,
-0.2347434163093567,
-0.9935354590415955,
0.05107824131846428,
0.4053401052951813,
-0.4449253976345062,
0.26418307423591614,
... | |
}
dl dd {display: block; float: left; }
```
... and it's semantic. | [
-0.052228894084692,
-0.06846331804990768,
0.33634066581726074,
-0.05711093172430992,
-0.2587378919124603,
-0.16886088252067566,
-0.10273412615060806,
0.2248775064945221,
0.18892548978328705,
-0.6396480798721313,
-0.35522153973579407,
0.45517200231552124,
-0.13119202852249146,
0.25739017128... | |
I am creating a server in .NET and a client application for Android. I would like to implement an authentication method which sends username and password to server and a server sends back a session string.
I'm not familiar with WCF so I would really appreciate your help.
In java I've written the following method:
``... | [
0.2717186510562897,
-0.08331126719713211,
0.4990137815475464,
-0.15908706188201904,
-0.033076170831918716,
0.027305269613862038,
0.3713468909263611,
-0.30697524547576904,
-0.011718171648681164,
-1.0247461795806885,
-0.17110955715179443,
0.46761173009872437,
-0.4470196068286896,
0.177914798... | |
)
{
Log.i( "login", "received " + getResponse(response.getEntity()) );
}
else
{
Log.i( "login", "got a null response" );
}
} catch (IOException e) {
Log.e( "error", e.getMessage() );
} catch (URISyntaxException e) {
Log.e( "error", e.getMessage() );
}
}
private String getR... | [
-0.12447119504213333,
-0.40634477138519287,
0.5214501023292542,
-0.011382920667529106,
0.16393853724002838,
0.2157377451658249,
0.4079781174659729,
-0.18784041702747345,
-0.06877142190933228,
-0.503687858581543,
-0.36230289936065674,
0.5604161620140076,
-0.3349247872829437,
0.3056766092777... | |
StringBuffer sb = new StringBuffer( length );
InputStreamReader isr = new InputStreamReader( entity.getContent(), "UTF-8" );
char buff[] = new char[length];
int cnt;
while ( ( cnt = isr.read( buff, 0, length - 1 ) ) > 0 )
{
sb.append( buff, 0, cnt );
}
response = sb.toString();
... | [
0.05138591676950455,
-0.156904399394989,
0.7489123940467834,
-0.43744418025016785,
0.011387498117983341,
0.3650681972503662,
0.39327487349510193,
-0.6631742119789124,
-0.30340269207954407,
-0.38384363055229187,
-0.3904440104961395,
0.5146402716636658,
-0.4623872637748718,
0.051062110811471... | |
the server side so far I haven't figured out anything.
I would be really thankful if anyone could explain how to create an appropriate method string Login(string username, string password) with appropriate App.config settings and Interface with appropriate [OperationContract] signature in order to read these two param... | [
0.40352171659469604,
-0.15438678860664368,
0.4197787642478943,
0.20982672274112701,
-0.4602406919002533,
-0.2794569730758667,
0.28998690843582153,
-0.12780018150806427,
-0.07406821846961975,
-0.8633862137794495,
0.155959814786911,
0.7431177496910095,
-0.1234973594546318,
0.1803804636001587... | |
login service:
```
[ServiceContract(Namespace="http://mycompany.com/LoginService")]
public interface ILoginService
{
[OperationContract]
string Login(string username, string password);
}
```
The implementation of the service could look like this:
```
public class LoginService : ILoginService
{
public st... | [
0.2337241917848587,
-0.09968096762895584,
0.1878911852836609,
-0.09795423597097397,
0.04366539418697357,
-0.057597946375608444,
0.5374417304992676,
0.15688936412334442,
-0.2245175689458847,
-1.1175004243850708,
-0.4466768205165863,
0.48834118247032166,
-0.37141215801239014,
0.3105419278144... | |
using a ServiceHost, or you can host it in IIS like a normal ASP.NET web (service) application. There are a lot of tutorials out there for both of these.
The WCF service config might look like this:
```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
... | [
0.018244246020913124,
-0.25434592366218567,
0.1579257845878601,
-0.005300349090248346,
-0.035754840821027756,
-0.2707653045654297,
0.35402223467826843,
-0.16691705584526062,
-0.3592914640903473,
-1.0351263284683228,
-0.3433334231376648,
0.40898433327674866,
-0.21915996074676514,
0.11705067... | |
/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="WcfTest.LoginService"
behaviorConfiguration="LoginServiceBehavior" >
<host> | [
-0.20171745121479034,
-0.030946778133511543,
0.09052035212516785,
-0.16600844264030457,
-0.07984331250190735,
-0.010020051151514053,
0.7632222175598145,
0.19422920048236847,
-0.5734012722969055,
-0.8254410624504089,
-0.1703951507806778,
0.4444902539253235,
-0.14228442311286926,
0.419695228... | |
<baseAddresses>
<add baseAddress="http://somesite.com:55555/LoginService/" />
</baseAddresses>
</host>
<endpoint name="LoginService" | [
0.11785710602998734,
0.19910964369773865,
0.31813845038414,
0.14190320670604706,
0.14426471292972565,
-0.10017863661050797,
0.1042076125741005,
0.0346393845975399,
-0.523754358291626,
-0.4392862021923065,
-0.1951221525669098,
-0.1480063796043396,
-0.07391522824764252,
0.16040152311325073,
... | |
address=""
binding="basicHttpBinding"
contract="WcfTest.ILoginService" />
<endpoint name="LoginServiceMex" | [
-0.17111393809318542,
-0.09862487018108368,
0.40845224261283875,
-0.004355620592832565,
0.007238226011395454,
0.07489340007305145,
0.2885001003742218,
-0.09126213192939758,
-0.029561670497059822,
-0.6972055435180664,
-0.38199910521507263,
0.13992001116275787,
-0.30058497190475464,
0.412912... | |
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
</configuration>
```
(The MEX stuff is optional for production, | [
0.11716445535421371,
0.03724534809589386,
0.33536556363105774,
-0.24610699713230133,
0.07117985188961029,
0.168133944272995,
0.18405058979988098,
0.136551171541214,
0.03318294510245323,
-0.63962322473526,
-0.5320671200752258,
0.2822957932949066,
-0.3475806415081024,
0.23668614029884338,
... | |
but is needed for testing with WcfTestClient.exe, and for exposing the service meta-data).
You'll have to modify your Java code to POST a SOAP message to the service. WCF can be a little picky when inter-operating with non-WCF clients, so you'll have to mess with the POST headers a little to get it to work. Once you g... | [
0.5196139812469482,
-0.2898509204387665,
0.42385584115982056,
0.04961725324392319,
0.037868060171604156,
-0.4114101529121399,
0.6422500014305115,
-0.2631226181983948,
-0.0027913495432585478,
-0.8355589509010315,
0.021702377125620842,
0.6071733236312866,
-0.39734745025634766,
0.132200136780... | |
the HTTP POST should look like from the Java code. There is a tool called "[Fiddler](http://www.fiddler2.com/fiddler2/)" that can be really useful for debugging web-services.
```
POST /LoginService HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://mycompany.com/LoginService/ILoginService/Login"
Host: ... | [
0.1333676278591156,
0.1769617795944214,
0.8071582913398743,
-0.21910460293293,
-0.4621449112892151,
0.13380815088748932,
0.4910231828689575,
-0.22482173144817352,
-0.047360923141241074,
-0.6209927201271057,
-0.049086544662714005,
0.21829834580421448,
0.026112591847777367,
0.172278508543968... | |
I'm working on making an application with `adobe air` and I have a div that uses overflow-y. In order for the UI to look nice and sexy, what's the best way to replace the ugly [default scrollbar](http://grabup.nakedsteve.com/a0fd084a9117dc8b1fe6626eda535d98.png) [link broken] with a creation of my own?
Thanks
EDIT: E... | [
0.45566174387931824,
0.058221396058797836,
0.5173950791358948,
0.342733234167099,
-0.1970120668411255,
-0.1635330766439438,
0.289100706577301,
-0.08752360939979553,
-0.06042180210351944,
-0.7451550364494324,
0.04595073312520981,
0.3838753402233124,
-0.1336928755044937,
0.19128791987895966,... | |
as zero in the Windows headers) to convert a codepage string to Unicode. | [
-0.18451116979122162,
-0.14931409060955048,
0.14490172266960144,
-0.053157635033130646,
-0.08673420548439026,
0.09806773066520691,
0.25543344020843506,
0.06568671017885208,
0.03310626745223999,
-0.45636633038520813,
-0.34742850065231323,
0.06859364360570908,
-0.30550965666770935,
-0.059113... | |
I'm designing a minimalistic wiki in RoR. Basically a project have many pages. My routing file looks like this:
```
map.root :controller => "projects"
map.resources :projects, :has_many => :pages
map.connect ':id', :controller => 'projects', :action => 'show'
map.connect ':project_id/:id', :controller => 'pages', :act... | [
0.3127836585044861,
-0.12350830435752869,
0.17953862249851227,
0.23218542337417603,
-0.3449779450893402,
-0.1379062831401825,
0.12307299673557281,
-0.12179970741271973,
-0.3235631287097931,
-0.9589571356773376,
0.22595718502998352,
0.021210908889770508,
-0.2498454600572586,
0.0715138018131... | |
all about convention over configuration. You have to buy into the conventions if you want the convenience that Rails brings. I would strongly encourage sticking to the RESTful model and accept what rails is doing now.
With that said, you can probably hack something together. It won't be pretty and it'll be a pain ever... | [
0.5650755167007446,
-0.3163992762565613,
0.4384116530418396,
0.4407747983932495,
-0.09449152648448944,
-0.6985300779342651,
-0.02877713181078434,
-0.11963730305433273,
-0.4662921726703644,
-1.101050853729248,
0.21082209050655365,
0.7140904068946838,
-0.32457587122917175,
0.1332838386297226... | |
have
```
map.connect ':project_id/:id', :controller => 'pages', :action => 'show'
map.connect ':id', :controller => 'projects', :action => 'show'
```
Then when ever you want to create a link you are going to have to make it yourself. You are going to want to use something like this:
```
<%= link_to 'Blah', :proj... | [
0.7325473427772522,
0.05786244571208954,
0.667129397392273,
0.1423923671245575,
0.03904324769973755,
-0.44149014353752136,
-0.03804769739508629,
-0.1324399709701538,
-0.33930861949920654,
-1.0333150625228882,
0.13430531322956085,
0.38743123412132263,
-0.12440940737724304,
0.184488400816917... | |
the conventions as much as you can because it'll make your life much easier. | [
0.6299235224723816,
-0.041082583367824554,
0.2269238978624344,
0.28395190834999084,
0.28599777817726135,
-0.4279949963092804,
0.35611578822135925,
-0.09235610067844391,
-0.28715255856513977,
-0.6606162786483765,
-0.020046506077051163,
0.659661591053009,
-0.03487316519021988,
-0.20465017855... | |
I'm using the Repository Pattern (like the examples in the <https://dotnet.microsoft.com/apps/aspnet/mvc> site) in a ASP.NET MVC application. I have two repositories, one called CategoryRepository an other called ProductRepository. I also use two services, the CategoryService and ProductService to validate and call the... | [
0.4899789094924927,
0.050228290259838104,
0.3970119059085846,
-0.07744117081165314,
-0.501203715801239,
0.011842099949717522,
-0.053387392312288284,
0.020279619842767715,
-0.39382144808769226,
-0.41090574860572815,
-0.046290453523397446,
0.5838146805763245,
0.07255445420742035,
0.172795638... | |
repositories into one service. So if you're creating an e-Commerce application roll up ProductRepository, CategoryRepository etc into something like CatalogService and have it host all repositories that are related. | [
0.27219158411026,
0.07006508111953735,
0.28844067454338074,
0.44457191228866577,
0.0875692144036293,
-0.0733836218714714,
-0.19765955209732056,
0.18338894844055176,
-0.5752848982810974,
-0.5470117926597595,
-0.022016989067196846,
0.18105824291706085,
0.08261093497276306,
0.3702363967895508... | |
SVN doesnt commit a library like MySql connector, so when I commit my project it is not uploaded to the server, how can I do this, I how to sync another resources like pictures?
SVN, just like any other source control management system, can handle binary files as well. This should not pose a problem.
Check that the fi... | [
0.37691599130630493,
0.040487293154001236,
0.25670742988586426,
0.04515460506081581,
-0.2735167145729065,
-0.6204494833946228,
0.42915672063827515,
-0.007787913549691439,
-0.4189167022705078,
-0.6370469927787781,
-0.06538423150777817,
0.5947913527488708,
-0.3634282052516937,
0.093359172344... | |
I have a pretty simple question. I want to make some date-based generic views on a Django site, but I also want to paginate them. According to the documentation the object\_list view has page and paginate\_by arguments, but the archive\_month view does not. What's the "right" way to do it?
Date based generic views don'... | [
0.3856346309185028,
0.011965001001954079,
0.3331072926521301,
0.10418850928544998,
-0.1803528070449829,
0.016760142520070076,
0.030019888654351234,
0.21143174171447754,
-0.37756773829460144,
-0.48362302780151367,
0.22962166368961334,
0.4425254762172699,
-0.3065129816532135,
0.4050915539264... | |
case.
Since your question is a valid one, and looking at the code; I wonder why they didn't decouple queryset generation as separate functions. You could just use them and render as you wish then. | [
0.07414526492357254,
0.00011530205665621907,
0.11327052861452103,
0.33066511154174805,
0.008023452013731003,
0.1875242292881012,
-0.101686492562294,
-0.16386941075325012,
-0.08284000307321548,
-0.5510035753250122,
0.14314405620098114,
0.6645272374153137,
0.024544987827539444,
0.01914922520... | |
I need to pass 2 parameters in a query string but would like them to appear as a single parameter to the user. At a low level, how can I concatinate these two values and then later separate them? Both values are Base64 encoded.
```
?Name=abcyxz
```
where both abc and xyz are separate Base64 encoded strings.
You shou... | [
0.2906242609024048,
0.21003778278827667,
0.06798888742923737,
-0.07721652090549469,
0.07279700040817261,
-0.056643325835466385,
0.29314979910850525,
-0.14432577788829803,
-0.03312483802437782,
-0.6228931546211243,
-0.01631167344748974,
0.23464319109916687,
-0.4978204369544983,
0.2791871428... | |
I have a database in SQLlite and I'd like to sort my table in an alphabetical order. How can I do it?
Is there a way to sort entries using only SQLite or do I have first to read a table into an array, sort it and afterwards to write it into a database?
Here is my query: "SELECT entry FROM table WHERE id=?"
I need to g... | [
0.03156020864844322,
0.36171337962150574,
0.27098020911216736,
0.10105868428945541,
-0.2089516669511795,
0.055504634976387024,
0.11212049424648285,
-0.1854562908411026,
-0.1350531280040741,
-0.5746111273765564,
-0.057543158531188965,
0.29498326778411865,
-0.30206742882728577,
0.09557399153... | |
field in alphabetical order, conversely 'desc' will give it to you in reverse alphabetical order.
Edit: as a general rule, you should let the database do the sorting. The below post is related, and arguably, almost the same. You might find it helpful:
[PHP/SQL: ORDER BY or sort($array)?](https://stackoverflow.com/que... | [
0.029944337904453278,
0.10866592079401016,
0.22388216853141785,
-0.11802476644515991,
-0.3057888448238373,
-0.05418960750102997,
-0.0412161648273468,
-0.2229977250099182,
-0.5768510699272156,
-0.2984986901283264,
-0.44921791553497314,
0.25478866696357727,
-0.25540369749069214,
-0.039702750... | |
I am working on a system that runs with Informix and so I started learning more and more about Informix. I thinking on studying and getting the Informix certification.
Do you think there is future on Informix out there? Or should I try learning more about Oracle or MySQL or some other popular database system?
I'm bia... | [
0.7538860440254211,
0.3062862753868103,
0.148539200425148,
0.15363158285617828,
-0.04674823582172394,
-0.16191816329956055,
-0.03767148777842522,
0.5155035257339478,
-0.2710569500923157,
-0.41780775785446167,
0.5759877562522888,
0.9231340289115906,
0.11994153261184692,
0.11733394116163254,... | |
to be working on or with Informix in 5 years; I think I'll probably be doing so in 10 years.
However, it is worth knowing about more than one DBMS, just as it is worth knowing about more than one operating system and worth knowing more than one programming language. Therefore, I certainly couldn't fault you for also l... | [
1.011182427406311,
0.11426714807748795,
0.5348196029663086,
0.10858307033777237,
-0.05529717728495598,
-0.42033278942108154,
0.5958462357521057,
0.15475764870643616,
-0.007582830730825663,
-0.718107283115387,
0.22379638254642487,
0.30963751673698425,
0.2379572093486786,
0.2100752890110016,... | |
of job, or whether you are looking for more stable employment.
Which other DBMS to learn is a complex decision. I'm not sure whether SQLite and GoogleAppEngine are likely to have sufficiently few developers that you can get a jump ahead of the other people. | [
0.3718999922275543,
0.04150233045220375,
0.009564106352627277,
0.21859626471996307,
0.001743681263178587,
-0.12539757788181305,
0.08948712795972824,
0.2333807796239853,
-0.17234396934509277,
-0.4468582570552826,
0.02917979285120964,
0.3974275290966034,
0.07343962788581848,
-0.1161197721958... | |
I am having a problem when trying to programmatically print a directory of word documents. In this example, I am trying to print only the files with the "3\_" prefix. The problem is that the file does not print unless there are two files with the 3\_ prefix. I have been looking around forever to figure this problem out... | [
0.19038358330726624,
0.13994809985160828,
0.19547544419765472,
-0.2495587021112442,
-0.03582749888300896,
0.01551765389740467,
0.5139082074165344,
0.13788524270057678,
-0.24701111018657684,
-0.8820838928222656,
0.0217310581356287,
0.44831401109695435,
-0.49964389204978943,
0.23943056166172... | |
and the path is correct. The filename is correct. Also, if I am watching the printer in the printers folder, a document will flash up for a brief second and then disappear ( I have printing paused so that I can see the output). If word is giving me an error, why doesn't it show? And why does this work if there are two ... | [
0.26773935556411743,
0.030390536412596703,
0.5092626810073853,
0.03750116005539894,
0.07757055759429932,
0.05820242688059807,
0.619056224822998,
0.0675344467163086,
-0.23922821879386902,
-0.8697464466094971,
0.06814486533403397,
0.5538496971130371,
-0.32767975330352783,
0.03843121230602264... | |
I can open the document manually and print (which works fine).
Edit: Thank you all for the answers. The background parameter in the printout() method was the issue. The program would quit before printing could fully spool (which is why I would see a document flash in the print queue and disappear. Turning background p... | [
0.2233808934688568,
0.22577466070652008,
0.8320369720458984,
-0.037777822464704514,
-0.05392707884311676,
-0.017468184232711792,
0.38322824239730835,
-0.1921887993812561,
-0.275266170501709,
-0.6077638268470764,
-0.14503492414951324,
0.6628926992416382,
-0.0009854360250756145,
0.1272966414... | |
{
if(filesToCheck[i].Contains("3_"))
{
filename = filesToCheck[i];
wrdDoc = wrdApp.Documents.Open(ref filename, ref oMissing, ref oTrue, ref oFalse, | [
0.04419529438018799,
0.2064877301454544,
0.5613479018211365,
-0.133014515042305,
0.18953678011894226,
-0.04484774172306061,
0.4308532476425171,
-0.5228552222251892,
-0.22694183886051178,
-0.5852687954902649,
-0.46842992305755615,
0.7717496752738953,
-0.07287416607141495,
0.3644611835479736... | |
ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, | [
0.46501871943473816,
0.7896689176559448,
0.09025174379348755,
-0.2980029284954071,
-0.07681910693645477,
0.35761797428131104,
0.3288775086402893,
0.06982795149087906,
-0.10210641473531723,
-0.32992592453956604,
-0.3282085955142975,
0.47608456015586853,
-0.25092577934265137,
0.6088832020759... | |
ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, | [
0.45859575271606445,
0.8022903800010681,
0.10077768564224243,
-0.2913239896297455,
-0.1159912571310997,
0.3100717067718506,
0.3082073926925659,
0.05160534009337425,
-0.08374582976102829,
-0.323877215385437,
-0.3040507733821869,
0.4759737253189087,
-0.24774284660816193,
0.6022384762763977,
... | |
ref oMissing);
wrdDoc.PageSetup.FirstPageTray = letterHeadTray;
wrdDoc.PageSetup.OtherPagesTray = defaultTray;
wrdDoc.PrintOut(ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, | [
-0.38782384991645813,
0.019796347245573997,
0.538957417011261,
-0.2792946696281433,
0.1675003170967102,
0.11517999321222305,
0.726158082485199,
-0.26571574807167053,
-0.12152282893657684,
-0.3360660970211029,
-0.42580947279930115,
0.2842736542224884,
-0.40087905526161194,
-0.05443418771028... | |
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref | [
0.4247397184371948,
0.7780279517173767,
-0.06181515008211136,
-0.35151055455207825,
0.04259713366627693,
0.5082828998565674,
0.41964825987815857,
0.0726017877459526,
-0.09630396962165833,
-0.39077696204185486,
-0.39410802721977234,
0.4938456118106842,
-0.2698521316051483,
0.551453232765197... | |
oMissing, ref oMissing);
wrdDoc.Close(ref oFalse, ref oMissing, ref oMissing);
wrdDoc = null;
}
}
```
Try and set the Background parameter (1st param) of the [PrintOut](http://msdn.microsoft.com/en-us/library/bb237242.aspx)() call to False.
Probably the last print j... | [
0.03333815559744835,
0.14942488074302673,
0.5940472483634949,
-0.13400283455848694,
0.27024880051612854,
0.09444306045770645,
0.49530893564224243,
-0.02085089311003685,
-0.20238235592842102,
-0.4791812002658844,
-0.4545377194881439,
0.7745985388755798,
-0.30226942896842957,
0.2043063789606... | |
Let's say you have a function that modifies a variable.
Should you write it like this: `void myfunc(int *a)` or like this `void myfunc(int &a)`?
The former forces you to call the function with `myfunc(&b)` so the caller is aware that `b` will be modified, but the latter is shorter and can be called simply with `myfun... | [
0.22574207186698914,
-0.1642913818359375,
0.17895083129405975,
-0.18137387931346893,
-0.08860805630683899,
0.012350738979876041,
0.3513433337211609,
0.0034940324258059263,
-0.20236803591251373,
-0.3326658606529236,
-0.20622621476650238,
0.5679924488067627,
-0.4534628391265869,
0.0059913699... | |
doesn't need to be taken.
Or if it ever needs to be called from non-C++ code. (eg. for use in shared libraries)
eg. The libc function `time_t time (time_t *result);`
If `result` is not NULL, the current time will be stored. But if `result` is NULL, then no action is taken.
If the function that you're writing doesn't... | [
0.43239259719848633,
0.20988842844963074,
0.10370185971260071,
0.11097081750631332,
0.24656988680362701,
-0.24187296628952026,
0.15341252088546753,
0.10332717001438141,
-0.18373100459575653,
-0.5266442894935608,
-0.2819453179836273,
0.430695503950119,
-0.28745704889297485,
0.21056091785430... | |
The Mac's OS X iMovie has built-in share options (like YouTube, iTunes, MobileMe, etc.). I currently develop a video-oriented content management system, and **I would like to add "share" functionality to iMovie for my CMS**, even if the installation is painful or 'hacky'. There does not seem to be an API, but maybe the... | [
0.2165151983499527,
0.06739239394664764,
0.5055469870567322,
0.09119696170091629,
0.033976875245571136,
-0.1902085542678833,
0.444550484418869,
0.45030003786087036,
-0.13294541835784912,
-0.8582576513290405,
-0.2532044053077698,
0.7971723079681396,
-0.6166307330131531,
-0.00995911937206983... | |
I want to make a PDF document reader, and the only thing I've found to help me is "Amyuni PDF Suite" that will turn the PDF into XAML and stream that. Are there any other controls for displaying PDFs in Silverlight? Or could I add an IFrame into Silverlight and let the client render it?
Cheers
Nik
> Or could I add an... | [
0.40322792530059814,
0.27452248334884644,
0.3470551371574402,
0.5690322518348694,
-0.14271874725818634,
-0.24561583995819092,
-0.13505978882312775,
-0.15090258419513702,
-0.09920299798250198,
-0.6344538331031799,
0.11242513358592987,
0.5762048363685608,
-0.22926346957683563,
0.105105735361... | |
in, but as for displaying a PDF within Silverlight, I think you're out of luck.
**Edit:**
[This question](http://silverlight.net/forums/t/21927.aspx) has some info on how to accomplish transparent Silverlight controls, I hope it helps! | [
0.49778395891189575,
0.12510284781455994,
0.0734473466873169,
0.28128379583358765,
-0.0349312350153923,
-0.57294100522995,
0.2871653139591217,
0.17348529398441315,
-0.165828138589859,
-0.6198350191116333,
-0.12973719835281372,
0.23611539602279663,
0.10475850105285645,
-0.011612307280302048... | |
What's the easiest way of storing a single number on a server so that any script can access it, using PHP? Currently, I have a number stored in a file, but this seems somewhat inelegant.
There's no right answer here, but most modern PHP systems for building web applications have some kind of Configuration object. This ... | [
0.05977217108011246,
-0.08159899711608887,
0.13987630605697632,
0.2145254760980606,
0.002799166599288583,
-0.05491865426301956,
0.20633937418460846,
-0.16345390677452087,
-0.30229657888412476,
-0.465392142534256,
0.10879269242286682,
0.3338352143764496,
-0.24669711291790009,
0.150643035769... | |
}
return self::$instance;
}
public static function set($key,$value){
//code to set $key/$value paid
}
public static function get($key){
//code to get a $value based on a $key
}
}
$config = NamespaceConfiguration::getInstance();
$config->set('myNumber',42);
....
function som... | [
0.1490194946527481,
-0.1323961317539215,
0.5687761902809143,
-0.022071219980716705,
0.3224949240684509,
0.011219923384487629,
0.19086818397045135,
-0.02229473739862442,
-0.11513084918260574,
-0.7141980528831482,
-0.4426928758621216,
0.49594590067863464,
-0.32124093174934387,
0.120703376829... | |
API to call when they want to get or set single configuration values, and allows a single developer to control the where of storage and the how of retrieval (which may be a flat file, XML file, memory cache, MySQL database, XML file stored in a MySQL Database, XML File stored in a MySQL Database that contains a node wh... | [
0.4202498197555542,
-0.02821929007768631,
0.20588968694210052,
0.14226672053337097,
0.26627638936042786,
0.21756291389465332,
-0.17823933064937592,
-0.08257545530796051,
-0.2050417959690094,
-0.4408714771270752,
-0.05261320248246193,
0.5751612782478333,
-0.33132779598236084,
0.127686172723... | |
in a property cache, pre-fetching certain values on instantiation, etc.) | [
-0.2708582580089569,
-0.12676209211349487,
-0.09070578962564468,
0.29722490906715393,
0.3223240077495575,
-0.11413658410310745,
0.26163962483406067,
-0.4794161319732666,
-0.08888562023639679,
-0.4486764669418335,
-0.4194439947605133,
0.39090821146965027,
0.05562539026141167,
0.047883737832... | |
I'm worried that I am misunderstanding something about stack behavior in C.
Suppose that I have the following code:
```
int main (int argc, const char * argv[])
{
int a = 20, b = 25;
{
int temp1;
printf("&temp1 is %ld\n" , &temp1);
}
{
int temp2;
printf("&temp2 is %ld... | [
-0.033241692930459976,
0.2266630381345749,
0.3172779381275177,
-0.4269256293773651,
0.21563081443309784,
-0.1296607255935669,
0.41636693477630615,
-0.6434618830680847,
-0.1369897872209549,
-0.5250704288482666,
-0.3472929894924164,
0.6294148564338684,
-0.4238226115703583,
-0.149561524391174... | |
I not getting the same address in both printouts? I am getting that temp2 is one int away from temp1, as if temp1 was never recycled.
My expectation is for the stack to contain 20, and 25.
Then have temp1 on top, then have it removed, then have temp2 on top, then have it removed.
I am using gcc on Mac OS X.
Note t... | [
0.012218655087053776,
0.26315924525260925,
0.37080055475234985,
-0.07039814442396164,
-0.08289013803005219,
-0.09311868250370026,
0.13170015811920166,
0.02608257718384266,
-0.43153613805770874,
-0.7167220711708069,
-0.20615707337856293,
0.4116855263710022,
-0.2983821928501129,
0.0764489024... | |
not only avoid returning pointers to automatic variables from functions, but also to avoid taking the address of variables from nested blocks and dereferencing them outside. I was trying to demonstrate how this causes problems, and couldn't get the screenshot.
The compiler is completely within its rights *not* to optim... | [
0.20494988560676575,
0.17001502215862274,
-0.10059083998203278,
-0.025951456278562546,
0.03532448038458824,
-0.022374197840690613,
0.3436194658279419,
-0.29948729276657104,
-0.29250195622444153,
-0.45366722345352173,
-0.004998067393898964,
0.1327275186777115,
-0.4788501560688019,
-0.059415... | |
this](http://www.cs.tufts.edu/~nr/pubs/blocks-abstract.html).) Naive stack layout probably puts each variable in its own slot, even when, as in your example, their lifetimes don't overlap.
If you're curious, you might get different results with `gcc -O1` or `gcc -O2`. | [
0.06013005971908569,
-0.0709240660071373,
-0.08015600591897964,
-0.005897433962672949,
0.21829617023468018,
-0.05139022320508957,
-0.2694929838180542,
-0.38006505370140076,
-0.27428963780403137,
-0.2973193824291229,
0.2292959839105606,
0.3071635961532593,
-0.34070536494255066,
0.0470936335... | |
I'm trying to pass a model attribute to a view, after successfully setting it to a new value from inside an action in my controller. But this variable is always nil by the time it gets to the view, so I can't use it to conditionally display stuff. I should add that this attribute is not a field in the database. What am... | [
0.1617642045021057,
-0.15295197069644928,
0.510464608669281,
-0.027882268652319908,
-0.014559738337993622,
-0.033397525548934937,
0.2811708152294159,
-0.3712702989578247,
-0.20913581550121307,
-0.6121065616607666,
0.20170660316944122,
0.5850245356559753,
-0.3950079679489136,
0.210523188114... | |
the controller. It is nil. What gives? Clearly I'm missing something basic here because this seems like it should be straightforward. Any insight would be greatly appreciated.
Thanks.
`edit_report_path` generates a URL with the ID of `@report` in it.
`redirect_to` essentially creates a whole new request, and goes to ... | [
0.21922661364078522,
-0.6044207215309143,
0.48150140047073364,
0.588826596736908,
-0.2168666273355484,
-0.13830402493476868,
-0.22304269671440125,
0.23727281391620636,
-0.1166423112154007,
-0.6256256699562073,
0.0028827523346990347,
0.5142234563827515,
-0.3137514293193817,
0.45806640386581... | |
the edit page - then @report will have the field set.
```
@report.mode = "t"
render :action => edit and return
```
Or, you can make `mode` a database field. | [
0.17638623714447021,
-0.1864360272884369,
0.680684506893158,
-0.023660171777009964,
-0.21040230989456177,
-0.05992819368839264,
0.08745627850294113,
-0.1746237725019455,
0.20335114002227783,
-0.634668231010437,
-0.1249706894159317,
0.8508909344673157,
-0.45579662919044495,
-0.1213293075561... | |
I want to extract a full path from the `PATH` environment variable with native cmd tools. Consider the following `PATH` content:
> C:\Program Files\Windows Resource Kits\Tools\;C:\Perl\site\bin;C:\Perl\bin;C:\WI
> NDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQ
> L Server\90\Tools\bi... | [
-0.098863385617733,
-0.05605187267065048,
0.22640030086040497,
0.08896540105342865,
-0.1894063651561737,
0.19668839871883392,
0.30266961455345154,
-0.31297117471694946,
-0.07335086166858673,
-0.57672119140625,
0.009056719951331615,
0.34016966819763184,
-0.10853053629398346,
-0.289889544248... | |
them (and thus need quotes). All in all I'd say you'd build a pretty brittle solution with pretty much code at this point.
If you want to know where a certain executable is, then
```
for %%i in ("mysql.exe") do @echo.%%~$PATH:i
```
will tell you that (or not, if it's nowhere in the `PATH`).
**UPDATE:** Ok, I got i... | [
0.05022366717457771,
0.1849667876958847,
0.5380014777183533,
-0.11101770401000977,
0.16983866691589355,
0.0750090479850769,
0.7151597142219543,
-0.3307599723339081,
-0.008981309831142426,
-0.5535355806350708,
-0.18525925278663635,
0.667021632194519,
-0.2928103804588318,
-0.1570198833942413... | |
set d=!d:~,-1!
set p=!p:%d%=!
goto :eof
```
This will print all matching paths from `PATH` where `notepad.exe` was found (the first program I know off the top of my head to be in two places here). Adapt accordingly for your problem.
`:clearpath` simply deletes the found path from the variable and then we try mat... | [
-0.012530487962067127,
-0.2965506315231323,
0.5036448240280151,
-0.19071771204471588,
0.04920520260930061,
0.1423702985048294,
0.34059321880340576,
-0.2640227675437927,
0.1967923641204834,
-0.9252645969390869,
0.0495394766330719,
0.7379850745201111,
-0.492785781621933,
-0.13981500267982483... | |
Sorry for the very basic question. What does the `&` operator do in this SQL
```
WHERE (sc.Attributes & 1) = 0
```
`sc` is an alias for a table which contains a column `attributes`.
I'm trying to understand some SQL in a report and that line is making it return 0 entries. If I comment it out it works. I have limit... | [
0.02452850714325905,
0.21382196247577667,
0.3123135566711426,
0.1639595776796341,
0.046075038611888885,
-0.11686023324728012,
0.35592809319496155,
-0.0059822858311235905,
-0.34496068954467773,
-0.4158100187778473,
0.20628061890602112,
0.47719258069992065,
-0.17074993252754211,
0.1744901984... | |
is an even number. Which is the same as saying that the first bit is not set.
Because of the name of the column though: "Attributes", then the "1" value is probably just some flag that has some external meaning.
It is common to use 1 binary digit for each flag stored in a number for attributes. So to test for the f... | [
-0.07671338319778442,
-0.1337454915046692,
0.5256783366203308,
0.3240356147289276,
0.007868887856602669,
0.06936506927013397,
-0.05978619307279587,
-0.15041111409664154,
-0.33740848302841187,
-0.32544079422950745,
0.02360912598669529,
0.16531646251678467,
-0.2653925120830536,
-0.1448394954... | |
the first bit is NOT set.
Some binary examples: (== to show the result of the operation)
```
//Check if the first bit is set, same as sc.Attributes&1
11111111 & 00000001 == 1
11111110 & 00000001 == 0
00000001 & 00000001 == 1
//Check if the third bit is set, same as sc.Attributes&4
11111111 & 00000100 == 1
11111011 ... | [
-0.024782484397292137,
-0.13495412468910217,
0.1510934829711914,
-0.12229330837726593,
0.015248846262693405,
0.08418530225753784,
0.2015470415353775,
-0.5717993974685669,
-0.13053452968597412,
-0.25567546486854553,
-0.49987557530403137,
0.3000708222389221,
-0.538345456123352,
-0.1828951835... | |
**Problems**
1. to get permissions
of each file in every folder
2. to find files
which have 777 permissions, and then
print the filenames with their paths
to a list
We can get permissions for files in one folder by
```
ls -ls
```
I do not know how you can get permissions of each file in every folder effectively.
... | [
-0.04545792564749718,
0.329388290643692,
0.1521056592464447,
0.09053914994001389,
0.17740318179130554,
-0.016478613018989563,
0.5119104385375977,
-0.04611482098698616,
-0.6467407941818237,
-0.6122192740440369,
-0.05285226181149483,
0.8797633647918701,
-0.468973308801651,
-0.237110286951065... | |
Not that I have time to discuss this properly to reach a conclusion and adapt my code because the phase one (of three) of a school project is in 24hrs, but at least I need to know if I did the correct decision.
I'm using linked lists and here's my structures:
```
typedef struct sCity {
int cityID;
char *cityN... | [
0.1678149551153183,
-0.43924713134765625,
0.7183935642242432,
0.35812026262283325,
0.15705309808254242,
-0.09346133470535278,
0.12107327580451965,
0.12860895693302155,
-0.14880487322807312,
-1.223970651626587,
-0.1956624537706375,
0.07636144012212753,
0.01916421763598919,
0.116510592401027... | |
lots of cities and those cities are linked all together, like a graph. For instance, A, B, C, D and E they are inserted in this order into the structure **City**. Then, I connect A to B, C and D, B to C, D, E, C to D and E and D to E.
Now, let's say I need to go to city E. This is the last one in the linked list and i... | [
0.6427965760231018,
-0.11023816466331482,
0.7150152921676636,
0.44639238715171814,
-0.1594802290201187,
0.004087571054697037,
0.20521888136863708,
0.4455602467060089,
-0.4071066677570343,
-0.9051645398139954,
-0.09778228402137756,
-0.01595398224890232,
-0.34318551421165466,
0.4203173816204... | |
support like 10,000 cities at least. But the shortest route is from A (which is the starting point) from C to E (or it could be A-D-E or A-B-E, doesn't matter).
Do my structures allow me to find the shortest route from A to E without traversing the whole linked list one by one? If not, what I'm doing wrong?
If yes, h... | [
0.35898876190185547,
0.2247989922761917,
0.6722297072410583,
0.3403741121292114,
-0.023138873279094696,
-0.10876055806875229,
0.5055760145187378,
0.17305968701839447,
-0.4568208158016205,
-0.8110735416412354,
-0.2377050668001175,
0.015528755262494087,
-0.18826046586036682,
0.05272309854626... | |
Digital Money Project](http://www.freedmoney.org/index/) looks helpful for your needs. It provides a basic transaction and balance framework. It is intentionally simple and abstract, so may offer useful design insights, particularly if you want to test novel ideas.
[Cyclos](http://project.cyclos.org/) is more practica... | [
0.5154941082000732,
-0.08854557573795319,
0.047972988337278366,
0.5472646355628967,
0.235709547996521,
0.03423737362027168,
-0.655773401260376,
0.22859078645706177,
-0.49288779497146606,
-0.18931053578853607,
0.10491945594549179,
0.2763122618198395,
0.08965521305799484,
0.06674261391162872... | |
any pattern or project related to reputation, karma, or points systems will likely have relevant overlap... | [
0.2535933554172516,
0.24690064787864685,
0.08309661597013474,
0.3219091296195984,
0.06098972633481026,
-0.029860494658350945,
0.12807370722293854,
-0.12765920162200928,
-0.5044623017311096,
-0.50005704164505,
-0.11269927024841309,
0.1760188490152359,
-0.04406251385807991,
0.104251891374588... | |
Does anybody know of the reason why ""could not create instance of UserControl"" error can occur. It seems to me that it occurs completely spontanous, for example after I add space after node or change tabulation. Maybe it's some kind of VS bug?
Here are controls. This configuration actually raises an error
```
<User... | [
-0.24963228404521942,
0.21211495995521545,
0.36652418971061707,
-0.11113886535167694,
-0.2213723361492157,
0.04335770383477211,
0.12571501731872559,
0.09887521713972092,
-0.46580246090888977,
-0.3132478892803192,
0.11183547973632812,
0.2212873250246048,
-0.2822994887828827,
0.0476066395640... | |
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<ShortcutsPrototype:KeyboardShortcutsTreeView />
<Button Grid.Row="1" Margin="3,3,3,3" Grid.Column="1" H... | [
-0.5370761156082153,
-0.14041003584861755,
0.7956495881080627,
-0.3662196099758148,
-0.506580650806427,
0.4738216698169708,
-0.22048532962799072,
-0.41363435983657837,
-0.47923338413238525,
-0.3826437294483185,
0.2174345701932907,
0.5788809657096863,
0.1710478812456131,
-0.0949542745947837... | |
<Grid>
<TreeView>
<TreeViewItem HorizontalContentAlignment="Stretch">
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="generalTreeViewEntry" Title="General" />
</TreeViewItem.Header>
<TreeViewItem Ho... | [
-0.1943073868751526,
-0.39453035593032837,
0.2958305776119232,
-0.35499197244644165,
-0.22179856896400452,
0.15834179520606995,
-0.06266824901103973,
0.04373437538743019,
-0.27333685755729675,
-0.7141071557998657,
-0.12156883627176285,
0.4175795912742615,
-0.08611604571342468,
0.2250650227... | |
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="generalNewFileTreeViewEntry" Title="New File" ShortcutKey="Ctrl+N" />
</TreeViewItem.Header>
</TreeViewItem>
<TreeViewItem HorizontalContentAlignment="Stretch"> | [
-0.21453829109668732,
-0.24071049690246582,
0.3440995216369629,
-0.36081722378730774,
-0.04461105912923813,
0.1410171091556549,
0.12910425662994385,
0.03570307418704033,
-0.41176435351371765,
-0.5104077458381653,
-0.1938524693250656,
0.5022760033607483,
-0.08230150490999222,
0.185807704925... | |
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="generalOpenFileTreeViewEntry" Title="Open File" ShortcutKey="Ctrl+O" />
</TreeViewItem.Header>
</TreeViewItem>
<TreeViewItem | [
-0.3650853931903839,
0.12617766857147217,
0.4141479730606079,
-0.39214134216308594,
-0.1941627860069275,
0.11166241765022278,
0.2024381160736084,
0.1724967360496521,
-0.2875211238861084,
-0.39070558547973633,
-0.3346900939941406,
0.3879795968532562,
-0.26222261786460876,
0.1052612811326980... | |
HorizontalContentAlignment="Stretch">
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="generalSaveFileTreeViewEntry" Title="Save File" ShortcutKey="Ctrl+S" />
</TreeViewItem.Header>
</TreeViewItem> | [
-0.17097623646259308,
-0.22481602430343628,
0.6100578308105469,
-0.030225086957216263,
-0.07763329148292542,
0.33232933282852173,
0.263534814119339,
-0.09487668424844742,
-0.46896570920944214,
-0.382267028093338,
-0.040631890296936035,
0.534853458404541,
0.05399097502231598,
0.154205322265... | |
<TreeViewItem HorizontalContentAlignment="Stretch">
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="generalSaveAsFileTreeViewEntry" Title="Save File As.." ShortcutKey="Ctrl+Shift+S" />
</TreeViewItem.Header>
... | [
-0.23649008572101593,
-0.11146288365125656,
0.4250308573246002,
-0.3572206497192383,
-0.1667434126138687,
0.24840043485164642,
0.307635098695755,
-0.09911485761404037,
-0.41078639030456543,
-0.41988083720207214,
-0.2650529444217682,
0.4053303897380829,
-0.08844057470560074,
0.1929708719253... | |
</TreeViewItem>
<TreeViewItem HorizontalContentAlignment="Stretch">
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="debugerTreeViewEntry" Title="Debuger" />
</TreeViewItem.Header>
</TreeViewItem>
<Tr... | [
-0.20364126563072205,
-0.2826884686946869,
0.1291869729757309,
-0.36264458298683167,
-0.016674889251589775,
0.20023390650749207,
0.1340087503194809,
-0.05104117467999458,
-0.2876155972480774,
-0.5436277985572815,
-0.21127691864967346,
0.41569116711616516,
-0.10958229750394821,
0.1344218403... | |
<TreeViewItem.Header>
<ShortcutsPrototype:KeyboardShortcutsTreeViewEntry x:Name="refactoringTreeViewEntry" Title="Refactoring" />
</TreeViewItem.Header>
</TreeViewItem>
</TreeView>
</Grid>
</UserControl>
<UserControl x:Class="ShortcutsPrototype.KeyboardShortc... | [
-0.5726869106292725,
0.1619706004858017,
0.5886340141296387,
-0.39476314187049866,
-0.6845291256904602,
0.29851409792900085,
0.039273422211408615,
-0.19342467188835144,
-0.462909072637558,
-0.20414771139621735,
-0.08883566409349442,
0.31309136748313904,
0.0572938546538353,
0.18368163704872... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.