text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
answer below, but my advice is to log the connection reset and retry. This will let your server run OK in development mode, and solidly in production. I've had this problem. See [The Python "Connection Reset By Peer" Problem](http://www.itmaybeahack.com/homepage/iblog/architecture/C551260341/E20081031204203/index.html)...
[ 0.20159222185611725, 0.10865354537963867, 0.2709234356880188, -0.00597209669649601, 0.1461736112833023, -0.05971040576696396, 0.4889260530471802, 0.013640366494655609, -0.579666793346405, -0.7044342756271362, 0.2678363025188446, 0.5221792459487915, -0.044542375952005386, 0.1050378084182739...
Python interpreter can clear out any pending threads.
[ -0.06349263340234756, -0.12880255281925201, -0.16409103572368622, -0.09796152263879776, -0.0067707207053899765, -0.13837769627571106, 0.3525335490703583, 0.21678973734378815, -0.1811545193195343, -0.20297688245773315, -0.48977652192115784, 0.5706814527511597, -0.5662496089935303, -0.243184...
I'm looking for a good, simple PHP function to get my latest Facebook status updates. Anyone know of one? Thanks! **EDIT:** I've added a half-solution below. Or if anyone knows a good way to read in the RSS feed and spit out the recent status update? Since I couldn't use the API route, I went with the RSS found at: ...
[ 0.14673803746700287, -0.23143598437309265, 0.15017175674438477, 0.07054375112056732, -0.09919974952936172, 0.41130489110946655, 0.4146413207054138, 0.2740553915500641, -0.44968757033348083, -0.6323716640472412, 0.2584865391254425, 0.6571580767631531, -0.18620307743549347, -0.20309947431087...
I'm using Spring's MVC with JSP views. Every JSP page has similar structure - headers, content, footers, perhaps a sidebar, etc. Looking around for "best practices" people seem to "include" footers and headers, but that means that every JSP page includes these "include" statements, giving a fixed format. To my eye a be...
[ 0.5180768370628357, -0.007527824025601149, -0.03282971307635307, 0.004042506217956543, -0.3542807102203369, -0.32620471715927124, 0.08264441043138504, -0.33040592074394226, -0.2905597984790802, -0.3857632577419281, -0.09165748953819275, 0.665874719619751, -0.23960255086421967, -0.332848191...
separate structure and content ("header" and "footer" being structural, and so belonging in the base template) in pages which contain a lot of text (think of help pages - you could put all that in the database, but why bother, especially since with Spring you can resolve to different views via the locale?). There does...
[ 0.3157612681388855, 0.030096035450696945, 0.34140804409980774, 0.0027871248312294483, -0.22037790715694427, -0.3453775942325592, 0.1536118984222412, -0.1484455019235611, -0.6333807110786438, -0.4090200960636139, -0.44705936312675476, 0.1617867648601532, -0.26774388551712036, -0.17662367224...
make it less intrusive). Anyway, my question is - does this already exist as a (popular/standard) tag library? I'm happy writing custom tags, but my impression of this stuff (generating web sites) is that there's a huge range of solutions already out there, with most work going into choosing the correct tools (eg Spri...
[ 0.6427581906318665, -0.04961252212524414, 0.37346985936164856, 0.043866708874702454, -0.10602415353059769, -0.20841652154922485, 0.03539842739701271, -0.04030048847198486, -0.34650009870529175, -0.5031460523605347, -0.05136660113930702, 0.4208049178123474, -0.038328733295202255, -0.1874913...
I've got a mySql stored procedure that looks like this-- ``` delimiter | create procedure GetEmployeeById(in ID varchar(45)) begin select id, firstName, lastName, phone, address1, address2, city, state, zip, username, password, emptypeid from mysche...
[ -0.02946712262928486, 0.08722518384456635, 0.5438559651374817, -0.07910892367362976, 0.38203728199005127, 0.24797476828098297, 0.2761012613773346, -0.2660274803638458, 0.08070031553506851, -0.6116926074028015, -0.30163246393203735, 0.25823432207107544, -0.15211062133312225, 0.3017506897449...
don't have the limit 1 in place, it always returns all of the rows in the table--with each record's id value set to the ID parameter. Why can't i just use where id=ID, and why does it return all of the records when i do? What are the implications of me using limit 1? Why am i programming on a saturday night? Because, i...
[ 0.444995254278183, 0.06667116284370422, 0.196397066116333, 0.15543699264526367, 0.145457923412323, -0.27653560042381287, -0.048031069338321686, -0.03075401671230793, -0.3935031294822693, -0.5392267107963562, 0.20108939707279205, 0.659985363483429, -0.38346198201179504, 0.4184072017669678, ...
**Question:** For typed in commands invoked via M-x I am having difficulty understanding how Emacs allows recalling and rerunning the commands. The command-history works quite differently from Vim. It puts the commands in a buffer rather than the "minibuffer". Is there a way to get something similar to Vim's approach ...
[ 0.195060133934021, 0.07122178375720978, 0.4209657609462738, -0.05853387713432312, -0.07772776484489441, 0.327846497297287, 0.17245912551879883, -0.06253869831562042, -0.369079053401947, -0.5248427987098694, -0.22098207473754883, 0.4096370041370392, -0.12572261691093445, 0.17497628927230835...
which you can execute commands. `C-x z` repeats the last command. Look at EMACS manual (info) section [8.5 Minibuffer History.](http://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-History.html#Minibuffer-History)
[ 0.42031165957450867, 0.07805397361516953, 0.49797406792640686, 0.08154741674661636, 0.3568740487098694, 0.20144525170326233, 0.1339188516139984, -0.09885258972644806, -0.6443391442298889, -0.2754427194595337, -0.27171358466148376, 0.4692550301551819, -0.38714244961738586, 0.358917593955993...
This is the ability to run your application on a cluster of servers with the intent to distribute the load and also provide additional redundancy. I've seen a presentation for [GridGain](http://www.gridgain.com/) and I was very impressed with it. Know of any others? There are several: * [Terracotta](http://www.terra...
[ 0.3553294837474823, 0.08536636084318161, 0.1850733608007431, 0.13037261366844177, -0.08800765872001648, 0.22715072333812714, -0.11654405295848846, -0.19746623933315277, -0.25868159532546997, -0.3486851155757904, -0.014444361440837383, 0.44797033071517944, -0.14650708436965942, 0.2346885651...
[modified Apache License](http://www.opensymphony.com/oscache/license.action); and * no doubt several others. Now I haven't used all of these but I've used or investigated the majority of them. GridGain and GigaSpaces are more centred around [grid computing](http://en.wikipedia.org/wiki/Grid_computing) than caching a...
[ 0.4165388345718384, -0.09726390987634659, 0.13189037144184113, 0.27683573961257935, -0.4371784031391144, -0.12213408946990967, -0.22445380687713623, -0.13764208555221558, -0.14550992846488953, -0.7030266523361206, 0.061996668577194214, 0.4002287983894348, -0.13639777898788452, 0.1959139108...
high-performance product but not cheap. Terracotta I'm less familiar with. The documentation for Coherence I find a bit lacking at times but it really is a powerful product. OSCache I've primarily used as a means of reducing memory usage and fragmentation in Java Web applications as it has a fairly neat JSP tag. If yo...
[ 0.2008763551712036, 0.03159797191619873, 0.14957037568092346, 0.24969157576560974, -0.2229471355676651, -0.15009553730487823, -0.10864334553480148, 0.20812667906284332, -0.261331170797348, -0.7249284386634827, 0.09141716361045837, 0.5144621133804321, 0.14635127782821655, -0.076178103685379...
caching solution that I've also used in Web applications. Never as a distributed cache though but it can do that. I tend to view it as a quick and dirty solution but that's perhaps my bias. memcached is particularly prevelent in the PHP world (and used by such sites as Facebook). It's a really light and easy solution ...
[ -0.061901289969682693, 0.04131803289055824, 0.0786491259932518, 0.14328312873840332, -0.331491082906723, -0.24425646662712097, -0.04163987562060356, 0.22697599232196808, -0.17273172736167908, -0.5697894096374512, 0.1979127824306488, 0.1394033581018448, -0.27679887413978577, -0.059166483581...
I have the points by the end of the GenerateButton class but now that I got my public double[][] matrix with all the points in, where do I begin drawing them??? my Main.java: ``` import java.awt.*; import javax.swing.*; public class Main { public static Display display = new Display(); public static void ...
[ 0.278012752532959, -0.0028489765245467424, 0.7763924598693848, -0.5010406970977783, -0.2633630037307739, 0.4424811601638794, 0.2332361340522766, -0.5224061608314514, -0.2416711151599884, -0.7002133727073669, -0.13240016996860504, 0.2482701539993286, -0.43428730964660645, 0.1924255639314651...
final int FRAME_HEIGHT = 660; final int X_OFFSET = 40; final int Y_OFFSET = 40; final int GRAPH_OFFSETX = 15; final int GRAPH_OFFSETY = 40; final int GRAPH_WIDTH = 500; final int GRAPH_HEIGHT = 500; final int GRAPH_INTERVAL = 20; JButton submit; JTextField numPoint; JPanel bpan...
[ -0.20736442506313324, -0.48177477717399597, 1.0335783958435059, -0.21722939610481262, -0.1845020353794098, 0.5860539674758911, -0.06044755503535271, -0.22804811596870422, -0.44388505816459656, -0.49933889508247375, -0.47124701738357544, -0.040775615721940994, -0.17292654514312744, 0.008587...
double[][] matrix; public Display() { init(); } public void init() { setBackground(Color.WHITE); setLocation(X_OFFSET, Y_OFFSET); setSize(FRAME_WIDTH, FRAME_HEIGHT); setTitle("Geometric Transformations"); getContentPane().setLayout(null); setDefaultL...
[ 0.18230481445789337, -0.4329887628555298, 0.4076453745365143, -0.24444517493247986, -0.005260370671749115, 0.22035259008407593, 0.26900961995124817, -0.4148121476173401, -0.03854586184024811, -0.5038589835166931, -0.5100352764129639, 0.33399975299835205, -0.4512106776237488, 0.159326761960...
numPoint.setBounds(530,200,120+20,25); SubmitButton submit = new SubmitButton("Submit"); submit.setBounds(530+150, 200, 100, 25); GenerateButton submitC = new GenerateButton("Generate"); submitC.setBounds(530-5, 200+130, 100, 25); points = new JPanel(new GridLayout(2,2)); ...
[ 0.26444876194000244, -0.28474053740501404, 0.5677092671394348, 0.20285910367965698, -0.4362322688102722, 0.4573550522327423, -0.09652575105428696, -0.5383995175361633, -0.0800786241889, -0.7312340140342712, -0.3001619577407837, -0.050376638770103455, -0.2143898606300354, -0.059381287544965...
this.add(points, BorderLayout.LINE_START); repaint(); } public void paint(Graphics g) { super.paint(g); g.setColor(Color.WHITE); g.fillRect(100, 100, 20, 30); g.setColor(Color.BLACK); genGraph(g, GRAPH_OFFSETX, GRAPH_OFFSETY, GRAPH_WIDTH, GRAPH_...
[ -0.055104393512010574, -0.5199348330497742, 0.6976451873779297, -0.14175908267498016, -0.17700763046741486, 0.3869573771953583, 0.25919461250305176, -0.11128092557191849, -0.2539614140987396, -1.0975725650787354, -0.2326747477054596, 0.4594685137271881, -0.6645374894142151, 0.0242379941046...
(Graphics g, int x, int y, int width, int height, int interval) { // draw background int border = 5; g.setColor(Color.BLACK); width = width - (width % interval); height = height - (height % interval);
[ 0.2711867392063141, -0.2954179346561432, 0.6862026453018188, -0.07849845290184021, 0.0424971878528595, 0.2993496358394623, 0.16215786337852478, -0.27876660227775574, -0.2049480378627777, -0.6271682977676392, -0.26715874671936035, 0.4506891071796417, -0.2841761112213135, -0.0929134041070938...
for (int col=x; col <= x+width; col+=interval) { g.drawLine(col, y, col, y+height); } for (int row=y; row <= y+height; row+=interval) { g.drawLine(x, row, x+width, row); } } class SubmitButton extends JButton implements ActionListener { public SubmitButto...
[ 0.1987593024969101, -0.4675551652908325, 0.5202083587646484, -0.2511143982410431, -0.08229956030845642, 0.24680544435977936, 0.27694231271743774, -0.5569038391113281, -0.028152283281087875, -0.2371169924736023, -0.547058641910553, 0.548218309879303, -0.3978545367717743, 0.01541642192751169...
super(title); addActionListener(this); } public void actionPerformed (ActionEvent e) { maxPoints = Integer.parseInt(numPoint.getText()) * 2; points.removeAll(); // clear JPanel so results from last aren't appended to
[ 0.11428123712539673, -0.37102818489074707, 0.5385725498199463, -0.11739517748355865, 0.06969846040010452, 0.2176998108625412, 0.48151108622550964, -0.2736376225948334, -0.2528548240661621, -0.27203169465065, -0.4813481867313385, 0.28370410203933716, -0.18310782313346863, 0.1044233813881874...
// delete this line and first enter 2 then 10 for # points for (int i=0; i<maxPoints; i++) { JTextField textField = new JTextField(); points.add(textField); // add to JPanel that gets displayed
[ -0.17639285326004028, -0.19748848676681519, 0.534338116645813, -0.2661563456058502, -0.09890493005514145, 0.22707177698612213, 0.28513240814208984, -0.2499745786190033, 0.03935397416353226, -0.47495773434638977, -0.38162556290626526, 0.25377941131591797, -0.15935130417346954, -0.1464147865...
pointsA.add(textField); // for getting values from later } matrix = new double[2][pointsA.size()/2]; // setting up dimension of matrix double[][] points.validate(); points.repaint();
[ -0.123738594353199, -0.19066831469535828, 0.562175989151001, -0.31554386019706726, -0.12318189442157745, 0.24128715693950653, 0.14464081823825836, -0.6344025731086731, -0.41272181272506714, -0.5682461857795715, -0.41448378562927246, 0.3002397119998932, -0.220658078789711, 0.049163151532411...
// What to Check: // Things between commas are either spaces (which will be stripped later) // or numbers! // Pairs must match up! } } class GenerateButton extends JButton implements ActionListener { public GenerateButton (String title) {
[ 0.19986115396022797, -0.526563286781311, 0.17489884793758392, -0.26819416880607605, 0.0353737473487854, -0.039232492446899414, 0.06343337148427963, -0.4505689740180969, -0.08391722291707993, -0.0973145067691803, -0.3248634338378906, 0.5431391000747681, -0.6060692071914673, -0.1426887810230...
super(title); addActionListener(this); } public void actionPerformed (ActionEvent e) { int c=0; for (int i=0; i<pointsA.size()/2; i++) { JTextField pointTF = pointsA.get(i);
[ 0.12654849886894226, -0.5354318022727966, 0.7218561172485352, -0.3700856566429138, 0.16285951435565948, 0.06645132601261139, 0.39295443892478943, -0.3974706530570984, -0.17016007006168365, -0.4089856445789337, -0.6094298362731934, 0.5590791702270508, -0.21532483398914337, 0.049593422561883...
Double point = Double.parseDouble(pointTF.getText()); matrix[0][c] = point; c++; } c=0; for (int i=pointsA.size()/2; i<pointsA.size(); i++) { JTextField pointTF = pointsA.get(i);
[ -0.05841191112995148, -0.21323858201503754, 0.5026718974113464, -0.6132503151893616, -0.03187763690948486, 0.05956047400832176, 0.2181035578250885, -0.40676215291023254, -0.08078067004680634, -0.33099204301834106, -0.5864357352256775, 0.3836944103240967, -0.44447967410087585, -0.1939298808...
Double point = Double.parseDouble(pointTF.getText()); matrix[1][c] = point; c++; } for (int i=0; i<matrix.length; i++) { for (int j=0; j<matrix[0].length; j++)
[ -0.022008724510669708, -0.004982259590178728, 0.35996878147125244, -0.4476131498813629, -0.09624367952346802, 0.21284984052181244, 0.31421464681625366, -0.4870626628398895, -0.06683153659105301, -0.1693255454301834, -0.4034675359725952, 0.17150501906871796, -0.5122253894805908, -0.12484139...
{ System.out.println("i:"+i+"\t"+"j:"+j); System.out.println(" "+matrix[i][j]); } } } } } ``` I'm not quite exactly sure what you are asking. Normally, you put all of
[ 0.07419967651367188, 0.12230680882930756, 0.18691551685333252, -0.13621710240840912, 0.12883538007736206, 0.06207621097564697, -0.16150176525115967, -0.407107412815094, -0.09064430743455887, -0.35269466042518616, -0.3182000517845154, 0.5668948292732239, -0.48288267850875854, -0.06076028943...
the drawing functionality in the paint() method. However, you generally want to keep any long running work off of the AWT dispatch thread which is the same thread that your buttons' actionPerformed() method is invoked on. To keep your program responsive, you may want to delegate it to a SwingWorker. If your app is not...
[ 0.5120998024940491, -0.28367915749549866, 0.5567843317985535, 0.07640250027179718, -0.2799583673477173, 0.11907848715782166, 0.02420317567884922, -0.3914521336555481, -0.12644967436790466, -0.6753239035606384, 0.015349267050623894, 0.6677036285400391, -0.4944266080856323, -0.22183990478515...
thread after this may cause AWT to get mad at you and throw an exception. If you are asking how to draw the points themselves, you should look into Graphics.drawPolyline() and the related methods, which you should call from within your paint() method. If you're asking how to draw them from within the button handler, ...
[ 0.5897219777107239, -0.3402387797832489, 0.4144634008407593, -0.1886191964149475, -0.36789533495903015, 0.2038927525281906, 0.2787873148918152, -0.2078903466463089, -0.1856423318386078, -0.6048159599304199, 0.1614883840084076, 0.6281582713127136, -0.31392303109169006, 0.031221989542245865,...
have to override their constructors. Also, you mask submit during your init() method: it is never referenced and neither is bpanel. Also, I would use a separate X and Y array rather than trying to combine them into a single matrix. You don't need to declare matrix to be public since the inner classes can already see i...
[ 0.4581902027130127, -0.047861650586128235, 0.14148633182048798, 0.06080963835120201, -0.45749643445014954, -0.1803319901227951, 0.4475939869880676, -0.31913191080093384, -0.19152262806892395, -0.20199915766716003, -0.03806765004992485, 0.3281322717666626, -0.0395943857729435, 0.05711372196...
stuff out. You should also try show the smallest possible problem that will allow us to answer your problem: this one sort of flows all over the place and is hard to follow. Oh, and the real reason why your lines are not being drawn: you call repaint on your JPanel and not the JFrame that you want to draw on. If you j...
[ 0.17306886613368988, -0.30539074540138245, 0.5813230872154236, 0.2744385600090027, -0.14541131258010864, 0.14185108244419098, 0.028146928176283836, 0.1740153580904007, -0.29405564069747925, -0.6382418870925903, -0.09713144600391388, 0.07094261795282364, -0.3454245328903198, 0.2911618053913...
I am using LINQ to EF and have the following LINQ query: ``` var results = (from x in ctx.Items group x by x.Year into decades orderby decades.Count() descending select new { Decade = decades.Key, DecadeCount = decades.Count() }); ``` So this kind of gets me to where I wa...
[ 0.05975523591041565, 0.15394653379917145, 0.8957263231277466, -0.11838245391845703, 0.3398627042770386, -0.035612571984529495, -0.3669503629207611, -0.08662985265254974, -0.523914098739624, -0.5216971635818481, -0.15993864834308624, 0.1924351006746292, 0.33314451575279236, 0.68642562627792...
and a count of items in that year. (i.e. 2001 - 10, 1975 - 15, 2005 - 5, 1976 - 1) The thing I really want to do though is to break them down by decade (i.e. 2000s - 15, 1970s - 16). How does one have a "calculated field" in the "by" part of the group clause for a Linq statement. I think what I want is basically somet...
[ 0.37961822748184204, 0.05717575550079346, 0.29391080141067505, -0.12552443146705627, 0.029959553852677345, 0.01805582270026207, 0.1197424829006195, -0.16233980655670166, -0.5336444973945618, -0.0798361748456955, -0.04901818931102753, 0.114926278591156, 0.2475433200597763, 0.475283384323120...
decades orderby decades.Count() descending select new { Decade = decades.Key, DecadeCount = decades.Count() }); ``` Or more generally the syntax so that I can do some more complicated evaluation/calculation to do the group by on. Any ideas? EDIT (update): (x => x.Year.Value.ToString()....
[ 0.1427064687013626, 0.047688595950603485, 0.8343226909637451, -0.04476900026202202, 0.41928449273109436, 0.011934631504118443, 0.10050541907548904, -0.2254229485988617, -0.17781007289886475, -0.41323283314704895, -0.30633345246315, 0.45205622911453247, -0.050522442907094955, 0.337268620729...
works (thank you) - the only "problem" is that the 's' is not on the end (i.e. 1970 vs. 1970s) Is there anyway to put a function in the by clause? i.e. group x by this.ManipulateYear(x.Year) into decades ... or ... x => x.Year.Value.ToString().Substring(0,3) + "0s" ?? It would be nice to have some technique (such as c...
[ 0.4516826570034027, 0.3355587422847748, 0.4161570370197296, 0.02224951609969139, 0.11772853136062622, -0.1511479616165161, 0.3549855351448059, -0.10495124757289886, -0.3544127643108368, -0.27593228220939636, -0.008566147647798061, 0.23298653960227966, 0.2327413260936737, 0.2807179987430572...
the partial classes on the entity framework. The calculated fields can be used on LINQ to objects (so you could return all the data as objects and then do a grouping)
[ -0.0778924971818924, -0.1835060566663742, 0.2348819524049759, 0.37475186586380005, -0.10366307199001312, -0.06032306328415871, -0.0817144587635994, -0.11506915092468262, -0.011022753082215786, -0.28728315234184265, -0.1521337777376175, 0.3262869119644165, -0.18239714205265045, 0.0912983268...
Is there anyway I can make the process of adding references to C# projects less painful? Every time I create a new C# class library project. I have to use the Add Reference dialog for 5 times at least. Install the [PowerCommands for Visual Studio](http://code.msdn.microsoft.com/PowerCommands). You can then simply copy...
[ 0.6276372671127319, 0.08933738619089127, 0.22932012379169464, 0.1205201968550682, -0.10502137243747711, -0.1105012446641922, 0.15694372355937958, 0.009309095330536366, -0.5289807319641113, -0.5521033406257629, 0.04671739414334297, 0.47511616349220276, -0.08479967713356018, 0.01563456468284...
I am try to use stringWithFormat to set a numerical value on the text property of a label but the following code is not working. I cannot cast the int to NSString. I was expecting that the method would know how to automatically convert an int to NSString. What do I need to do here? ``` - (IBAction) increment: (id) se...
[ -0.1543595939874649, 0.22611865401268005, 0.5840555429458618, -0.34834444522857666, -0.010780704207718372, -0.05971997603774071, 0.46671125292778015, -0.5622106790542603, 0.1038866639137268, -0.6399563550949097, -0.054424088448286057, 0.6311138868331909, -0.22631968557834625, 0.27802258729...
I have wpf app and I am allowing usercontrol plugins that implement an interface. i want to allow the plugins to have their own properties but I want to have these properties access from menu in the host. How would this be architected best? The properties could be string, double etc. Malcolm It comes from pen-and...
[ 0.29797062277793884, -0.16424402594566345, 0.5394881963729858, -0.02812246046960354, -0.2787010669708252, 0.02957315929234028, -0.03631138801574707, -0.25835534930229187, -0.302314817905426, -0.6653921604156494, 0.010645946487784386, 0.18300223350524902, -0.21210885047912598, -0.0896977409...
Whenever we make changes to the CSS, it generally takes 24 hours to reflect those changes on my site. I have tried clearing the server cache and browser cache but it doesn't help too. Is there any other way to make the CSS changes reflect immediately after updation? it happens in all the browsers... when i check it in...
[ 0.5020156502723694, 0.1493348777294159, 0.7505825161933899, -0.17827019095420837, -0.20429907739162445, -0.028345923870801926, 0.41825541853904724, -0.013752458617091179, -0.410137414932251, -1.1260368824005127, 0.06145885959267616, 0.3339531123638153, -0.007072479929775, 0.098040930926799...
shows me latest css whereas other one shows me old css.Notice the "c" is captital in one path whereas small in other path. Thanks. I've found this to be a pretty common problem in a lot of my projects. I would suggest two things... 1. If it's just an app that you are working on you can use the [CSS Cachebuster](http:...
[ 0.23709823191165924, -0.04583604633808136, -0.14388276636600494, 0.07522726058959961, -0.023481346666812897, 0.08113699406385422, -0.10758114606142044, 0.15112394094467163, -0.19272202253341675, -0.7634899616241455, 0.30658310651779175, 0.6178529858589172, -0.09043252468109131, 0.015417532...
whatever.css?12212009035543
[ 0.1332363784313202, 0.1796858161687851, 0.06692808121442795, 0.46246376633644104, 0.32461366057395935, -0.17262029647827148, 0.23326312005519867, 0.42156004905700684, -0.36585983633995056, -0.16110627353191376, 0.16386249661445618, 0.343425989151001, -0.1723860800266266, 0.3393840491771698...
``` var insInvoice = new NpgsqlCommand( @"INSERT INTO invoice_detail( invoice_id, invoice_detail_id, product_id, qty, price, amount) VALUES ( :_invoice_id, :_invoice_detail_id, :_product_id, :_qty, :_price, :_qty * :_price)", c); with(var p = insInvoice.Parameter...
[ -0.09817421436309814, 0.13817927241325378, 0.614239513874054, -0.12802177667617798, 0.006129808723926544, 0.5039228200912476, 0.05522327125072479, -0.5214986801147461, -0.007583002559840679, -0.4640142321586609, -0.37228748202323914, 0.8061597347259521, -0.27746832370758057, 0.273137927055...
p.Add("_price", NpgsqlDbType.Numeric, 0, "price"); } ``` --- ``` kludge: for(var p = insInvoice.Parameters; false;) { p.Add("_invoice_id", NpgsqlDbType.Uuid, 0, "invoice_id"); p.Add("_invoice_detail_id", NpgsqlDbType.Uuid, 0, "invoice_detail_id"); p.Add("_product_id", NpgsqlDbType.Uuid, 0, "produ...
[ 0.025391802191734314, -0.042956046760082245, 0.5189359784126282, -0.08105757087469101, -0.15959402918815613, 0.5779328942298889, -0.21535366773605347, -0.6847913861274719, -0.2389967143535614, -0.26758429408073425, -0.3718412220478058, 0.7876052260398865, -0.3582981526851654, 0.02573689073...
"invoice_id" }, { "_invoice_detail_id", NpgsqlDbType.Uuid, 0, "invoice_detail_id" }, { "_qty", NpgsqlDbType.Integer, 0, "qty" }, { "_price", NpgsqlDbType.Numeric, 0, "price" } } }; ``` For more on object and collection initializers, you can download chapter 8 of [C# in Depth](http://mannin...
[ 0.23991620540618896, -0.13002951443195343, 0.03469268977642059, 0.5784657001495361, -0.14404144883155823, 0.1376749873161316, -0.07755900919437408, -0.20062878727912903, -0.07798435539007187, -0.18893815577030182, -0.15998652577400208, 0.5481545925140381, 0.04944820702075958, 0.05577160418...
I want to implement something exactly like "[Changing the Default Text in the Search Box](http://msdn.microsoft.com/en-us/library/aa905322.aspx)" for a WPF search TextBox. The box should show some greyed out "Search.." text when it's empty, and then it should function normally when text is typed in. The linked article ...
[ 0.49424993991851807, -0.29497087001800537, 0.09206523001194, -0.001073663355782628, 0.02427000366151333, -0.19733422994613647, 0.36644574999809265, -0.10588551312685013, -0.26130789518356323, -0.7532503008842468, 0.038392264395952225, 0.596298098564148, -0.2710695266723633, -0.097790479660...
it from <http://work.j832.com/2008/01/real-update-to-bag-o-tricks.html>
[ 0.3003771901130676, -0.24711154401302338, 0.7639763355255127, -0.07366675138473511, -0.01770039089024067, -0.15679781138896942, 0.2145819514989853, 0.11604928970336914, -0.22332333028316498, -0.15977485477924347, 0.0736265704035759, 0.26673078536987305, -0.2839941382408142, -0.375648021697...
I'm trying to get: ``` document.createElement('div') //=> true {tagName: 'foobar something'} //=> false ``` In my own scripts, I used to just use this since I never needed `tagName` as a property: ``` if (!object.tagName) throw ...; ``` So for the second object, I came up with the following as a quick solution ...
[ -0.11468805372714996, 0.1023869588971138, 0.4987776577472687, -0.371785044670105, 0.01298525370657444, -0.15714119374752045, 0.6167840361595154, -0.13216349482536316, -0.1631351262331009, -0.8357930183410645, -0.42239466309547424, 0.6065656542778015, -0.32692384719848633, 0.124869264662265...
return false; } catch (e) { return true; } } ``` Is there a good substitute? This might be of interest: ``` function isElement(obj) { try { //Using W3 DOM2 (works for FF, Opera and Chrome) return obj instanceof HTMLElement; } catch(e){ //Browsers not supporting W3 DOM2 don't have HTMLElemen...
[ 0.12016266584396362, -0.03413962200284004, 0.48953795433044434, -0.18470051884651184, 0.15862597525119781, 0.0048601021990180016, 0.43906861543655396, -0.4775482416152954, -0.19345645606517792, -0.5776905417442322, -0.30427396297454834, 0.47123903036117554, -0.4535520672798157, -0.10448051...
(obj.nodeType===1) && (typeof obj.style === "object") && (typeof obj.ownerDocument ==="object"); } } ``` It's part of the [DOM, Level2](http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html). **Update 2**: This is how I implemented it in my own library: (the previous code didn't work in Chrome, b...
[ -0.6531298756599426, -0.10516457259654999, 0.8267277479171753, -0.4037783443927765, -0.058503810316324234, -0.10416163504123688, 0.33507099747657776, -0.34290218353271484, -0.07863403856754303, -0.5918434262275696, -0.17762026190757751, 0.5008673071861267, -0.28484970331192017, 0.094385303...
"number" && typeof o.nodeName==="string" ); } //Returns true if it is a DOM element function isElement(o){ return ( typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2 o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName==="string" ); } ```
[ -0.35437676310539246, 0.05056862160563469, 0.8071675300598145, -0.30589425563812256, 0.20096558332443237, 0.1564357429742813, 0.3453657627105713, -0.41011276841163635, -0.26192909479141235, -0.42888161540031433, -0.44241297245025635, 0.4373173117637634, -0.2758558690547943, 0.1069393157958...
I am upgrading an unmanaged C++ application to use the XP/Vista style common controls by adding a manifest. According to MSDN's page on [application manifests](http://msdn.microsoft.com/en-us/library/aa374191.aspx), you are required to specify the name and version in the manifest, and optionally the description: ``` <...
[ 0.4497120678424835, 0.2242840975522995, 0.5969840288162231, -0.17725150287151337, 0.24318084120750427, -0.03477621078491211, 0.12488089501857758, -0.490509957075119, 0.24908721446990967, -0.6593420505523682, -0.3095426559448242, 0.7028058767318726, -0.015446173958480358, -0.007947514764964...
being implied by having the same major and minor versions for assemblies, but this does not seem to apply to applications. I also haven't been able to see the name, version, or description specified by the manifest in the application's properties on Windows XP. What effect does changing these have? Is it worthwhile to...
[ 0.2738184928894043, 0.02156156115233898, 0.4788031280040741, 0.007647166959941387, 0.16033613681793213, -0.29496508836746216, 0.32600703835487366, 0.23364421725273132, -0.41470101475715637, -0.7367886900901794, -0.20549491047859192, 0.5899254083633423, -0.11734959483146667, 0.1947419345378...
Environment.MachineName); DirectoryEntry newUser = localMachine.Children.Add("localuser", "user"); ``` *Here starts the original code snippet for domain accounts:* ``` public string CreateUserAccount(string ldapPath, string userName, string userPassword) { string oGUID = string.Empty; try { ...
[ -0.1195913627743721, -0.14758238196372986, 0.7960453629493713, -0.42673033475875854, 0.466056764125824, 0.0744248554110527, 0.17840412259101868, 0.054974209517240524, -0.2261071503162384, -0.9863263368606567, -0.443745493888855, 0.6088529229164124, -0.4411594867706299, 0.470355361700058, ...
newUser.Properties["samAccountName"].Value = userName; int val = (int)newUser.Properties["userAccountControl"].Value; newUser.Properties["userAccountControl"].Value = val | 0x10000; newUser.CommitChanges(); oGUID = newUser.Guid.ToString(); newUser.Invoke("SetPassword", new o...
[ -0.35184016823768616, -0.289760023355484, 0.7156540155410767, -0.32792603969573975, 0.34059327840805054, 0.34382379055023193, 0.38319331407546997, -0.3388965427875519, -0.274833083152771, -0.9242067933082581, -0.4494694173336029, 0.5654909014701843, -0.5153182148933411, 0.32522499561309814...
{ //DoSomethingwith --> E.Message.ToString(); } return oGUID; } ``` > There are some specifics to understand > when dealing with user passwords and > boundaries around passwords such as > forcing a user to change their > password on the next logon, denying > the user the right to change their...
[ -0.015753353014588356, -0.21312062442302704, 0.501266598701477, 0.11788357049226761, 0.3082858622074127, -0.19757096469402313, 0.3181277811527252, -0.4296254813671112, -0.09917325526475906, -0.7863193154335022, -0.34587085247039795, 0.6014496684074402, -0.07477200031280518, 0.3064711689949...
sections. > > > Please refer to this great > [MSDN article: Managing User Passwords](http://msdn.microsoft.com/en-gb/library/ms180915.aspx) > for examples and documentation > regarding these features. ``` CONST HEX ------------------------------------------ SCRIPT ...
[ -0.2475983053445816, 0.21038398146629333, 0.4171290099620819, 0.2245713621377945, 0.3090374171733856, -0.32952046394348145, 0.43836793303489685, 0.08008457720279694, -0.2555302679538727, -0.8165865540504456, -0.4339961111545563, 0.5710684657096863, -0.11527654528617859, 0.09164109826087952...
0x0008 LOCKOUT 0x0010 PASSWD_NOTREQD 0x0020 PASSWD_CANT_CHANGE 0x0040 ENCRYPTED_TEXT_PWD_ALLOWED 0x0080 TEMP_DUPLICATE_ACCOUNT 0x0100 NORMAL_ACCOUNT 0x0200 INTERDOMAIN_TRUST_ACCOUNT 0x0800 WORKSTATION_TRUST_ACCOUNT
[ -0.1027490496635437, 0.046614017337560654, 0.34023618698120117, 0.23332226276397705, -0.10055860877037048, -0.12572453916072845, 0.5761902928352356, -0.05760794132947922, -0.2273278534412384, -0.45185962319374084, -0.14155016839504242, 0.4457894563674927, -0.40040266513824463, 0.0341093540...
0x1000 SERVER_TRUST_ACCOUNT 0x2000 DONT_EXPIRE_PASSWORD 0x10000 MNS_LOGON_ACCOUNT 0x20000 SMARTCARD_REQUIRED 0x40000 TRUSTED_FOR_DELEGATION 0x80000 NOT_DELEGATED 0x100000 USE_DES_KEY_ONLY 0x200000 DONT_REQ_PREAUTH
[ 0.018303314223885536, 0.17612919211387634, 0.5829184651374817, 0.2003481686115265, 0.13479605317115784, -0.23148931562900543, 0.3476142883300781, -0.26369190216064453, -0.1516587883234024, -0.4611051082611084, -0.16474944353103638, 0.44891273975372314, -0.29497984051704407, 0.0107441321015...
0x400000 PASSWORD_EXPIRED 0x800000 TRUSTED_TO_AUTH_FOR_DELEGATION 0x1000000 ```
[ -0.22981923818588257, 0.33472856879234314, 0.3474920988082886, 0.26903778314590454, 0.03475787863135338, -0.2779594957828522, 0.2968761622905731, -0.25279155373573303, -0.010732135735452175, -0.4830404818058014, -0.013569763861596584, 0.539313018321991, -0.1509799063205719, 0.1195542216300...
On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. I would do it at database level. Talking about sql server 2005, i would use the new ROW\_NUMBER() function, look at: [Paging SQL Server 2005 Results](ht...
[ -0.21082961559295654, 0.0869109034538269, -0.04979763552546501, -0.3181211054325104, -0.4440068304538727, 0.31265348196029663, 0.06315949559211731, -0.22779500484466553, -0.27614322304725647, -0.3868992328643799, 0.20875918865203857, 0.2588634192943573, -0.36360642313957214, -0.29641455411...
Is there any possibility to run Hyper-V Manager MMC SnapIn on Windows 2008 Web edition ? Thanks No, this is against the Web Editions EULA.
[ -0.10884552448987961, 0.10052065551280975, 0.5032411813735962, 0.09132523834705353, -0.24341434240341187, -0.21810930967330933, 0.20141857862472534, 0.3592737317085266, -0.3538069725036621, -0.3680623769760132, 0.011408553458750248, 1.0324182510375977, -0.6580240726470947, 0.05326679721474...
I have a worker thread that is listening to a TCP socket for incoming traffic, and buffering the received data for the main thread to access (let's call this socket *A*). However, the worker thread also has to do some regular operations (say, once per second), even if there is no data coming in. Therefore, I use `selec...
[ 0.38628441095352173, -0.03663603216409683, 0.19396692514419556, -0.15310029685497284, -0.05843190476298332, -0.20352262258529663, 0.17460863292217255, -0.10507851839065552, -0.22627583146095276, -0.8510808348655701, 0.02263663522899151, 0.45858049392700195, -0.19665896892547607, 0.24256360...
main thread might not always be able to process it right away, hence the need for buffering.) Now, I also need to be able to signal the worker thread to do some other stuff immediately; from the main thread, I need to make the worker thread's `select()` return right away. For now, I have solved this as follows (approa...
[ 0.06978385150432587, -0.22090086340904236, 0.32891011238098145, -0.17924118041992188, -0.10525593161582947, 0.003149560419842601, 0.12694700062274933, -0.08602999895811081, -0.18596090376377106, -0.5031107068061829, -0.11940596252679825, 0.20409610867500305, -0.34063607454299927, 0.3621358...
socket for sending. In its call to `select()`, the worker thread now lists both *A* and *B* in the `fd_set`. When the main thread needs to signal, it `sendto()`'s a couple of bytes to the corresponding port on `localhost`. Back in the worker thread, if *B* remains in the `fd_set` after `select()` returns, then `recvfro...
[ 0.11812953650951385, -0.3887607455253601, 0.36686307191848755, -0.231207937002182, -0.30571481585502625, 0.21287935972213745, 0.12610463798046112, 0.23173753917217255, -0.22298981249332428, -0.6120039820671082, -0.1782149225473404, 0.7578924894332886, -0.3859422504901886, 0.195646211504936...
I guess – and I don't really feel like figuring out the appropriate action for each of the cases. I think ideally, I would like to call some function which takes *A* as input, and does nothing except makes `select()` return right away. However, I don't know such a function. (I guess I could for example `shutdown()` th...
[ 0.3803281784057617, 0.1570502668619156, -0.017789769917726517, -0.11065411567687988, -0.11579661071300507, 0.002229704987257719, 0.14269064366817474, 0.0816149115562439, -0.12871100008487701, -0.46788617968559265, -0.16697746515274048, 0.6593241095542908, -0.09102559089660645, 0.2874163389...
amount of memory). I guess [Unix domain sockets](http://en.wikipedia.org/wiki/Unix_domain_sockets) would do exactly this, but: the solution should not be much less cross-platform than what I currently have, though some moderate amount of `#ifdef` stuff is fine. (I am targeting mainly for Windows and Linux – and writing...
[ 0.16831852495670319, 0.19839805364608765, 0.25629836320877075, 0.05508670210838318, 0.063320592045784, -0.1531381607055664, 0.14874285459518433, -0.020463064312934875, -0.3972187936306, -0.5765730738639832, 0.060912277549505234, 0.49002742767333984, 0.04059930145740509, 0.28705039620399475...
to buffer the incoming data (and due to reasons beyond what I can control, it cannot be the sender). Now that I was writing this, I realized that someone is definitely going to reply simply "[Boost.Asio](http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio.html)", so I just had my first look at it... Couldn't find...
[ 0.39746972918510437, -0.06799624860286713, 0.5875989198684692, -0.29839184880256653, -0.24835322797298431, -0.002722926903516054, 0.3197689950466156, -0.1236775815486908, -0.18323999643325806, -0.6417118906974792, -0.06823482364416122, 0.35433003306388855, -0.10539344698190689, -0.16810069...
thread to unblock a worker thread. It is portable across POSIX systems. I have seen a variant of similar technique for Windows in one system (in fact used together with the method above, separated by `#ifdef WIN32`). Unblocking can be achieved by adding a dummy (unbound) datagram socket to `fd_set` and then closing it...
[ 0.01761229708790779, -0.38238808512687683, 0.3169933557510376, -0.057006094604730606, -0.09764288365840912, -0.22913026809692383, 0.3249531686306, 0.04521584510803223, -0.5382073521614075, -0.49469050765037537, -0.3641320466995239, 0.17549729347229004, -0.4924749433994293, 0.48038673400878...
is scheduled for a worker thread.
[ 0.2833382189273834, -0.19051995873451233, 0.3649643659591675, -0.029117148369550705, 0.38779398798942566, 0.13231255114078522, 0.034527234733104706, 0.21874992549419403, -0.36270803213119507, -0.3282017409801483, -0.0958128273487091, -0.022100895643234253, -0.04918493703007698, 0.200963899...
still trying to find where i would use the "yield" keyword in a real situation. I see this thread on the subject [What is the yield keyword used for in C#?](https://stackoverflow.com/questions/39476/what-is-the-yield-keyword-used-for-in-c) but in the accepted answer, they have this as an example where someone is it...
[ 0.15613193809986115, 0.07425586879253387, 0.3272331655025482, -0.13293692469596863, -0.04007107764482498, -0.12178187072277069, 0.11505388468503952, -0.4507352113723755, -0.2386794090270996, -0.32404622435569763, -0.10246384888887405, 0.5403265357017517, 0.014774938113987446, -0.0552905462...
what the first element is. Or they might want to write them to a file as they get them, rather than building the whole list in memory and then writing it to a file. That's why it makes more sense to use yield return. It doesn't look that different to building the whole list and returning it, but it's very different be...
[ 0.03316634148359299, -0.0952448919415474, 0.03423476964235306, -0.16937696933746338, 0.10791526734828949, -0.08805648237466812, 0.2003813534975052, -0.5167350172996521, -0.06531410664319992, -0.47950130701065063, -0.12556327879428864, 0.36536428332328796, -0.3985227346420288, -0.0403368547...
a new i, it runs a bit more of the code in Integers(). The code in that function is "paused" when it hits a `yield return` statement.
[ -0.06872311979532242, -0.1868075579404831, 0.4447420537471771, -0.38216346502304077, -0.03638153523206711, -0.11514118313789368, 0.23536211252212524, -0.4335082769393921, 0.021184708923101425, -0.537305474281311, -0.20694968104362488, 0.3406861126422882, 0.03956929221749306, 0.353637576103...
``` game.h needs: - packet.h - socket.h server.h needs: - socket.h socket.h needs: - game.h ``` The problem comes when I try to include socket.h into game.h, because socket.h has game.h included already. How do I solve these kind of problems? The usual way, use #ifdef and #define in your header files inside game.h...
[ 0.3298501968383789, 0.1682383418083191, -0.09528098255395889, 0.05512160435318947, -0.19857700169086456, -0.266723096370697, -0.06919988989830017, -0.011983231641352177, -0.19894418120384216, -0.897196352481842, -0.13017892837524414, 0.6265943646430969, -0.27907025814056396, 0.344765216112...
I have byte array as input. I would like to convert that array to string that contains hexadecimal representation of array values. This is F# code: ``` let ByteToHex bytes = bytes |> Array.map (fun (x : byte) -> String.Format("{0:X2}", x)) let ConcatArray stringArray = String.Join(null, (ByteToHex stringAr...
[ -0.17951734364032745, 0.04861068353056908, 0.4273836314678192, -0.11255206167697906, -0.24881766736507416, 0.15322361886501312, -0.07410280406475067, -0.3393990695476532, -0.1494949907064438, -0.6056750416755676, 0.1568140834569931, 0.6340450644493103, -0.430387407541275, 0.061866350471973...
lists, but the best I could get is array or list of strings. Questions: 1. What would be simplest, most elegant way to do this? 2. Is there string formatting construct in F# so that I can replace String.Format from System assembly? Example input: [|0x24uy; 0xA1uy; 0x00uy; 0x1Cuy|] should produce string "24A1001C" Th...
[ 0.5345054864883423, 0.07315757870674133, 0.40319228172302246, 0.2208200842142105, -0.18082855641841888, -0.03144871070981026, 0.18621020019054413, -0.378929078578949, -0.5565575957298279, -0.5707801580429077, 0.09758522361516953, 0.7768760323524475, -0.3993050456047058, -0.3128691613674164...
String.concat will just call into String.Join. Your code may have to be altered slighly though because based on your sample you import System. This may create a name resolution conflict between F# String and System.String.
[ 0.37847650051116943, -0.1884680688381195, 0.3021031320095062, -0.030086180195212364, -0.0689801275730133, -0.2931675910949707, 0.2959354519844055, -0.0362529493868351, -0.0849427729845047, -0.46626630425453186, 0.13765354454517365, 0.4560854434967041, -0.6655994653701782, 0.225478529930114...
So, looking for a mysql-db-lib that is compatible with py3k/py3.0/py3000, any ideas? Google turned up nothing. As for future plans of MySQLdb, you might want to ask the author (Andy Dustman). His blog is here: <http://mysql-python.blogspot.com/>
[ 0.4395177662372589, 0.35725533962249756, -0.4942018687725067, -0.19454117119312286, 0.02214553765952587, -0.11315765976905823, 0.35916629433631897, 0.7175627946853638, -0.5103827118873596, -0.17161336541175842, -0.17192168533802032, 0.15528841316699982, -0.3100455403327942, -0.186411455273...
It's my understanding that StackOverflow (SO) was built using ASP.NET. What surprised me is it's so well designed and well implemented. Without knowing much about the internals of SO, here are my observations and educated guesses: 1. SO appears to be highly scalable. 2. URLs in SO are friendly. 3. It appears that SO d...
[ 0.06568777561187744, -0.2587359547615051, 0.46092620491981506, 0.0886911004781723, -0.19374622404575348, -0.19036251306533813, 0.0938471332192421, -0.2391546666622162, -0.3458441495895386, -0.8142622709274292, -0.26761680841445923, 0.32970672845840454, -0.1803402602672577, -0.1666151136159...
Comet-like feature: As you type your answer, if there is any other answer posted, you get the notification. If you choose to load it, of course only a partial page refresh is done and your answer remain intact. Have yet to see this in any other ASP.NET app. So my questions: * What are other ASP.NET web applications...
[ 0.4999806880950928, -0.38363340497016907, -0.0363650768995285, 0.5837988257408142, -0.31001636385917664, -0.1711703985929489, 0.03583917394280434, 0.36112844944000244, -0.7052901983261108, -0.3777090907096863, 0.16616207361221313, 0.18692877888679504, -0.26121410727500916, -0.0944568291306...
I am trying to figure out a clean way to intercept uncaught exceptions that occur in my application. I have log4j configured for logging the normal application flow and caught exceptions, so that is taken care of. Right now, I have a class that takes all error-level messages and adds them to a queue to be emailed in ...
[ 0.34809455275535583, 0.26089370250701904, 0.10347148776054382, 0.16106651723384857, 0.037559062242507935, -0.07843581587076187, 0.4076663553714752, 0.2089310735464096, -0.36055222153663635, -0.5579702258110046, 0.0348081961274147, 0.30192431807518005, -0.23945167660713196, 0.04145291075110...
LogInterceptors on JBoss, but this project is using Tomcat. Is there any way that I might go about this? Is there a LogInterceptor equivelant for Tomcat? Should I try to redirect the Tomcat logging to a custom appender? (If so - any hints on that?) Some other ideas? I figured that this *has* to be a solved problem by ...
[ 0.38505619764328003, 0.16688953340053558, 0.2537684738636017, 0.26893094182014465, 0.05405030399560928, -0.4055265486240387, 0.6379023790359497, 0.07061327248811722, -0.4681154489517212, -0.5654343366622925, -0.27045682072639465, 0.6311495900154114, -0.21893274784088135, -0.201096788048744...
will receive the original request and response objects, with the addition of a request attribute named javax.servlet.error.exception that contains the exception object. That said, I have not actually done this with Tomcat, and most of the web applications that I've worked on forward to a generic error page at the webs...
[ 0.025591472163796425, -0.04074119031429291, 0.6135836243629456, -0.1806645393371582, -0.026196561753749847, -0.10247175395488739, 0.20865921676158905, -0.3397079408168793, -0.07209327816963196, -0.7708077430725098, -0.31917253136634827, 0.3884989619255066, -0.3133700489997864, -0.184976369...
I've recently started poking around in Visual Studio 2005, and I'm mucking about in Visual C++. When I double click on a control in the designer, it opens the .h file, which I've understood to be for prototype declarations, and if I put all the guts to the functions in there, I can get my program to work, but I don't l...
[ 0.27315470576286316, 0.35257068276405334, 0.08443950116634369, -0.06162229925394058, 0.03826258331537247, -0.13995292782783508, 0.22477009892463684, 0.04893423244357109, -0.2503845691680908, -0.509319543838501, 0.004460595548152924, 0.4254966378211975, -0.29481419920921326, -0.015812911093...
is expecting, as I'm more used to a GCC/MinGW environment. The errors I receive the most are: `error C2228: left of '.trackBar1/.value/.etc' must have class/struct/union` `error C2227: left of '->trackBar1/->Value/->etc' must point to class/struct/union/generic type` I've tried the following to access the control...
[ -0.19623035192489624, 0.013232128694653511, 0.24827814102172852, 0.0012282513780519366, 0.0006140868063084781, -0.03055766224861145, 0.24455511569976807, -0.41567984223365784, -0.10548239946365356, -0.42363178730010986, 0.10876061767339706, 0.7487007975578308, -0.28964266180992126, -0.2752...
Win32 form application. The code that Visual Studio uses to create instances of the controls is: ``` this->trackBar1 = (gcnew System::Windows::Forms::TrackBar()); ``` In Dev-C++ or code::blocks, I'm used to putting the class declarations in the .h file, and then specifying the functions in the .cpp file by doing c...
[ 0.028811918571591377, 0.07853930443525314, 0.07545437663793564, 0.04042809084057808, -0.172261580824852, -0.24261468648910522, 0.2721925973892212, -0.2518884837627411, 0.1830066293478012, -0.5462239980697632, -0.12962831556797028, 0.8332422375679016, -0.3684839904308319, -0.370001882314682...
be others but these are the ones you will typically handle.
[ 0.2461286187171936, -0.13683834671974182, -0.3461778461933136, 0.1046130508184433, -0.33980387449264526, 0.04009479656815529, 0.14560464024543762, 0.10706736147403717, -0.1982995718717575, -0.528120219707489, -0.08641626685857773, 0.5607274770736694, -0.28954631090164185, -0.49290052056312...
I've reached a point were I can't keep procrastinating the writing of the graphics part of an iPhone app. What has kept me from digging into it so far has being that it feels hard to figure out how to realize my idea of having "glowing", "sparkling" effects on some lamps. I used to be good at such things back in the d...
[ 0.9426292777061462, 0.26607808470726013, -0.07772661745548248, 0.12377171218395233, -0.06436458230018616, -0.2929666042327881, 0.07873766124248505, 0.28952935338020325, -0.25777727365493774, -0.440036803483963, 0.307364284992218, 0.4778691232204437, 0.12225072085857391, 0.21884778141975403...
preferably, but I'm willing to pay some for it if it comes to that. The easiest approach may be to render all your effects as PNGs with transparency in a drawing/painting program and just position/build/animate them on the iPhone itself. This will work for glows, particles and similar effects. CGImage is the fastest r...
[ 0.5255481600761414, -0.2793857455253601, 0.7691394686698914, 0.18426759541034698, -0.18511460721492767, 0.21268722414970398, 0.011681423522531986, -0.167564257979393, -0.17648378014564514, -0.7300456762313843, 0.003792437491938472, 0.37956923246383667, 0.03808673843741417, -0.3334340453147...
for writing an offline client to the Google Reader service I would like to know how to best sync with the service. There doesn't seem to be official documentation yet and the best source I found so far is this: <http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI> Now consider this: With the information from above...
[ 0.3741302192211151, -0.015189497731626034, 0.3221196234226227, 0.35304275155067444, -0.06313185393810272, 0.10297399759292603, 0.20036621391773224, 0.04833988472819328, -0.24180850386619568, -0.8876979351043701, 0.21346575021743774, 0.5229990482330322, -0.15297505259513855, -0.064839802682...
*n*=10) latest (parameter *r*=d) entries. If I specify the parameter *r*=o (date ascending) then I can also specify parameter *ot*=[last time of sync], but only then and the ascending order doesn't make any sense when I just want to read some items versus all items. Any idea how to solve that without downloading all i...
[ 0.08476253598928452, 0.044174470007419586, 0.6810343861579895, 0.06132344901561737, 0.17808562517166138, 0.3857913613319397, -0.03014460951089859, 0.07593024522066116, -0.4423846900463104, -0.8521152138710022, 0.12878958880901337, 0.31505247950553894, 0.10229890793561935, 0.469915747642517...
mark them as read. In turn that would mean that I need to keep my own read/unread state on the client *and* that the entries are already marked as read when the user logs on to the online version of Google Reader. That doesn't work for me. Cheers, Mariano To get the latest entries, use the standard from-newest-date-de...
[ 0.29153162240982056, 0.3105451166629791, 1.1057795286178589, 0.16145583987236023, -0.009577181190252304, 0.038526274263858795, -0.15654917061328888, 0.10807668417692184, -0.4034362733364105, -0.2929288446903229, -0.042540401220321655, 0.551934540271759, 0.24832256138324738, 0.2964569330215...
point is new, and all after that are already known to you. In the latter case, you're done, but in the former you need to find the new stuff older than what you've already retrieved. Do this by using the continuation to get the results starting from just after the last result in the set you just retrieved by passing i...
[ 0.14991852641105652, 0.02161693014204502, 0.5158933997154236, -0.03939516469836235, 0.1448158621788025, -0.2835277020931244, -0.3521667718887329, -0.20137090981006622, -0.26446881890296936, -0.5304096341133118, -0.25965356826782227, 0.2785373032093048, 0.11122778803110123, 0.65835446119308...
If the frequency of checking is user-set, and thus could be very frequent or very rare, you can use an adaptive algorithm to reduce network traffic and your processing load. Initially request a small number of the latest entries, say five (add `n=5` to the URL of your GET request). If all are new, in the next request, ...
[ 0.48889878392219543, -0.3054307997226715, 0.4137873947620392, 0.36485782265663147, 0.00787893682718277, -0.15640448033809662, 0.3076973855495453, -0.11119107902050018, -0.30188000202178955, -0.681852400302887, -0.18135468661785126, 0.4895409941673279, -0.1796724796295166, 0.001935424166731...
if I'm wrong here, you also want to know, after you've downloaded an item, whether its state changes from "unread" to "read" due to the person reading it using the Google Reader interface. One approach to this would be: 1. Update the status on google of any items that have been read locally. 2. Check and save the unr...
[ 0.4141630232334137, -0.19495442509651184, 0.48647063970565796, 0.38008490204811096, 0.08609725534915924, 0.006223919801414013, 0.3284788727760315, 0.04801371321082115, -0.32833918929100037, -0.7084996104240417, -0.046336859464645386, 0.4869134724140167, -0.09787777066230774, 0.116461440920...
read count, and compare that to google's. If the feed has a higher read count than you calculated, you know that something's been read on google. 5. If something has been read on google, start downloading read items and comparing them with your database of unread items. You'll find some items that google says are read ...
[ 0.707374632358551, 0.04247598722577095, 0.35313692688941956, 0.4256764054298401, 0.028418755158782005, -0.20665384829044342, 0.1993648260831833, 0.09846367686986923, -0.10831700265407562, -0.7869055271148682, -0.22853589057922363, 0.6119052171707153, 0.008422308601439, 0.23556670546531677,...
la vie*; record the number remaining as an "unfound unread" total which you also need to include in your next calculation of the local number you think are unread. If the user subscribes to a lot of different blogs, it's also likely he labels them extensively, so you can do this whole thing on a per-label basis rather...
[ 0.46633780002593994, -0.4005643129348755, 0.46178877353668213, 0.11185471713542938, -0.026538433507084846, -0.019363684579730034, 0.4516966938972473, 0.4685398042201996, -0.3253346085548401, -0.40487751364707947, -0.06583594530820847, 0.5860038995742798, -0.19700445234775543, 0.12458769977...
as starred or unstarred, as well. Now, as you say, this > ...would mean that I need to keep my own read/unread state on the client and that the entries are already marked as read when the user logs on to the online version of Google Reader. That doesn't work for me. True enough. Neither keeping a local read/unread s...
[ 0.3291530907154083, 0.029400428757071495, 0.640348494052887, 0.06751931458711624, -0.3001824617385864, 0.1341816484928131, 0.2892266809940338, 0.27693697810173035, -0.23435941338539124, -0.3986029028892517, 0.10885954648256302, 0.5453919768333435, -0.07828955352306366, 0.46903714537620544,...