instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
So, I found a similar question here, but the answers are more about style and whether or not you are able to do it. My question is, what actually happens when you call a non-void function that returns an object, but you never assign or use said returned object? So, less about whether or not you can, because I absolutel...
stackexchange/codereview
I'm trying to find a good standard for a database schema that will let me do a couple things. Mainly, I am writing a web app that needs to handle various types of logins. First being the standard ASP Application Services login, Second being OpenId/oAuth logins and third being Active Directory logins. What's a good su...
stackexchange/codereview
Given: public class C<T> { private class D { public boolean equals( Object o ) { if ( !(o instanceof D) ) // line 4 return false; D other = (D)o; // line 6 return i == other.i; } int i; } } I get: C.java:4: illegal gener...
stackexchange/codereview
I've been trying to figure out this problem. I have an assignment to make a basic calculator. To do so i need the instructions in postfix. I have found some code online, which worked but used gets(). I tried replacing the gets... but the program no longer works. Here is the code, i was hoping someone could find the e...
stackexchange/codereview
How can I get access to an element (TextBlock) within the DataTemplate of GridViewColumnHeader from the code???? I want to set focus on the column header.
stackexchange/codereview
I am using the JSON iPhone framework v2.3.1, and I want to query Google Maps about shops, hotels, etc. It is possible to create an URL direction that gives me a list of directions? Actually I am using this Objective C code. - (void) searchCoordinatesForAddress { //Build the string to Query Google Maps. //I don...
stackexchange/codereview
I have a class similar to the following that uses an internal List: public class MyList<T> : IEnumerable<T> { private List<T> _lstInternal; public MyList() { _lstInternal = new List<T>(); } public static implicit operator List<T>(MyList<T> toCast) { ...
stackexchange/codereview
You have a blog. You want certain combinations of symbols (i.e. :), :(, :p ...) to be parsed into emoticons before the post in the blog are printed on the screen. Should this parsing be a responsibility of the Model, the View or the Controller?
stackexchange/codereview
I have a 3rd party app that is generating an executable for me, but it's putting its own name into the "File description" and "product name" details of the executable. When I sign these with authenticode, it causes the user prompt to show the 3rd party app name rather than my own, even though it's signed with my compa...
stackexchange/codereview
Given: <%=form_for [:project, @note], :remote => true do |f| %> I'd like to create a jquery bind that automatically saves every few seconds. I'm not worried about the timing part yet, just how to use jquery to submit the form automatically (ie, not submit button click by the user.) I tried this, but it isn't working. ...
stackexchange/codereview
I'm logged in as admin, and go to view a user's account page. How can I get the id of the user I'm viewing, rather than the $user->uid (which would be the admin user id)?
stackexchange/codereview
A user is allowed to enter any mathematical equation they like (with one variable): x + 5 1 - x/2 (x/3) * (56/13) These are stored as strings in the database. When they are retrieved I need to substitute 'x' for a number and check the value of the equation. How could I do this? I was considering writing a parser to de...
stackexchange/codereview
I really don't understand regex and I also can't find any regex rule to validate culture codes as: en-GB, en-UK, az-AZ-Cyrl, others. How can I validate these codes with a regular expression?
stackexchange/codereview
After upgrading my ASP MVC from 3 Preview to 3 Beta I see strange behaviour in my Ajax forms. @using(Ajax.BeginForm("New", new AjaxOptions() {OnSuccess = "onAjaxSuccess", OnFailure = "onAjaxFailure", OnBegin = "onAjaxBegin", HttpMethod = "Post"})) {} <form action="/Order/New" data-ajax="true" data-ajax-begin="onAjaxBe...
stackexchange/codereview
I want to write the python equivalent of mdfind. I want to use the .Spotlight-V100 metadata and I cannot find a description for the metadata db format used, but NSMetadataQuery seems to be what I need. I'd like to do this in python using the built in Obj-C bindings, but have not been able to figure out the correct inca...
stackexchange/codereview
I have a TextBlock control, which is data bound to DateTime property. The text displayed something like this: Thursday, October 21, 2010 I need to switch UI Culture on the fly, using something like this: Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = ...
stackexchange/codereview
I've made a simple Lua-execution in Ada, it cooly run everything I need via Lua.Load_Buffer("os.execute('wxlua.exe wx.lua')") but I don't need win32 cmd.exe-window, which is default opens on program's start-up. Is there any way to control this event directly from Ada? P.S. os.execute() sends commands directly to Window...
stackexchange/codereview
I'm struggling to find an efficient and flexible representation for my data. We have a many-to-many relationship between two entities which have arbitrary lifetimes. Let's call these Voter and Candidate. Each relationship has a measurement which we'd like to summarize in various ways. These are timestamped and are guar...
stackexchange/codereview
The length of three sides of the triangle, a, b and c will be given, and I need to find the coordinates of the vertices. The center (probably the circumcenter) can either be the origin or (x,y). Can anyone point me in the right direction?
stackexchange/codereview
SELECT YEAR(aum.AUM_Timeperiod) as Year, DATEPART(q, aum.AUM_TimePeriod) AS Quarter, SUM(cast(aum.AUM_AssetValue AS money)) as total_AssetValue FROM AssetUnderManagement as aum, LineOfBusiness where aum.LOB_ID = LineOfBusiness.LOB_ID and LineOfBusiness.LOB_Name = 'Asset Managem...
stackexchange/codereview
Since Rails is using Ruby (dynamic language), would it be possible to create a very flexible 'configuration' class that has properties that you use throughout the website, AND have the ability to add new class properties (in the db for web modification) and then just use it in the code. Each property would be of a spe...
stackexchange/codereview
I'm using Wordpress 3.0.1 and I have made a custom post-type called 'dienasgramatas'. My plugin also makes custom rewrite rules for displaying all posts from this post type, and even a custom permalink structure to query posts with this post type coming from a defined author. But I can't create a rule for pagination: T...
stackexchange/codereview
It supposed to be very simple, I want to limit my results in this for-each but also want to check a node. For some reason it doesn't work combining them both in one statement? I have a checkbox (recommended) which can be ticked to 'Yes'. When I remove the limit 5 in the for-each, it shows all the items that have reco...
stackexchange/codereview
Can I print an XML document using escaped text instead of CDATA sections? For example, I want the output string as &lt;sender&gt;John Smith&lt;/sender&gt; instead of <![CDATA[<sender>John Smith</sender>]]>. UPDATE: I know an XML document can be represented in both ways without any sematic difference, but I want to prin...
stackexchange/codereview
In Java can I return a boolean value with the following: public boolean areBothEven(int i, int j) { return (i%2 == 0 && j%2 == 0); } Or do I need to surround the statement with an if and then return true and false appropriately?
stackexchange/codereview
On my set I use jquery to fadeout an image, change its source to something else, then fade back in. However, sometimes on slow connections, the image will fade back in before the source completely changes, so the old image will still appear for a brief second before the new one comes in. Is there a way to have a callba...
stackexchange/codereview
Does anyone know how to tell if a cached jQuery object has gone stale, e.g. is no longer in the DOM? For example: var $cached_elem = $('.the_button'); // .. and then later $cached_elem.text('updating...'); I have recently encountered the situation where the $cached_elem is removed from the DOM due to some other eve...
stackexchange/codereview
how can i use this script: http://www.pengoworks.com/workshop/jquery/autocomplete.htm with a web service? Thanks!
stackexchange/codereview
I am trying to parse an xml using GdataXML I have a query which is not working and I wonder why: <address_component> <long_name>Mars</long_name> <short_name>Mars</short_name> <type>route</type> </address_component> I want to save the long_name where the type is route and I am using this query /*[name() = 'add...
stackexchange/codereview
Hello all I have class that inherited from Qtreeview and I implement simple ( empty ) mousePressEvent function But whenever I try to do this , the selection of the items in the Qtreeview are disabled , when I remove this function everything is working fine What im missing here ? Here Is the code: void MyTreeWidget::...
stackexchange/codereview
I have an ObservableCollection<myClass> list. It contains a 10 objects of type MyClass. class MyClass { string name; int age; } If I want to find all items in list where age = 10, can I use the Contains method? If yes how can I do this without using iteration?
stackexchange/codereview
Reading binary data out of the database, and I need to convert it back into a Digital Persona fingerprint template. I'm not familiar with serialization and deserialization, so I could use a bit of help. Here's what I tried: Dim rsBioData As SqlDataReader = SQL.ExecuteReader Dim byteTemplate As Byte Dim memStreamTempl...
stackexchange/codereview
I am looking for an embeddable library for doing atomic file I/O from java. I need the library to support the following features. basic page management -- allocate/free pages and read/write atomic (all or nothing) writes (basically journaled I/O) A simple binary page format (needs to be readable by C++) It does not n...
stackexchange/codereview
I have three input fields for collecting telephone numbers from users. I display one field and hide the other two. I have placed a link(Add home number) below it and when you user clicks on the link it shows the hidden input field. And I have placed one more link below it when clicked displays the last input field. <...
stackexchange/codereview
I have started a project using Rails 3.0. I am using devise for the authentication. Devise includes links to signin and forgot password in the sign up page. These links are loaded by means of a partial.I did not need these links, so I removed them and reloaded the page, but still these links remain. I tried clearing th...
stackexchange/codereview
From the man page: Deletes all stale tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>". So I removed a bunch of branches using git push origin :staleStuff and then ran git remote prune o...
stackexchange/codereview
Currently,I have this objective to meet. I need to query the database for certain results. After done so, I will need to compare the records: For example: the query return me with 10 rows of records, I then need to compare: row 1 with 2, row 2 with 3, row 3 with 4 ... row 9 with 10. The final result that I wish to have...
stackexchange/codereview
I wanted to add an extension method to the HtmlHelper class so that developers could generically retrieve and AreaActionLink<T> without having to add the new { area = "MyArea" } each time as well as not have to specify a Controller. This all works well and good if I specify the namespace or put the namespace of the Are...
stackexchange/codereview
Currently, my VBA code creates a single file for each note. Here's some simplified sample code: Sub saveNotes() Set myNote = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes) For ibi = 1 To myNote.Items.Count fname = myNote.Items(ibi).Subject myNote.Items(ibi).SaveAs "C:\Temp\" & fname & ...
stackexchange/codereview
Does anyone know a good RAD tool for AJAX interface programming? Is Grails doing the job for you?
stackexchange/codereview
so, I'm facing the challenge of having to log the data being changed for each field in a table. Now I can obviously do that with triggers (which I've never used before, but I can imagine is not that difficult), but I also need to be able to link the log who performed the change which is where the problem lies. The trig...
stackexchange/codereview
I'm a bit stuck on a 'has_one' and 'belongs_to' relationship and getting it to properly display in Formtastic. I have a person model that has one picture (a profile picture). I want the user to be able to select the picture using radio buttons. So far, I have: <% form.inputs do %> <%= form.input :picture, :as => :rad...
stackexchange/codereview
does the file which is sent as an argument to execfile runs as an independent process / thread or is the code imported and then executed ? . Also i wanted to know how efficient is it compared to running threads / process .
stackexchange/codereview
in my C project I've referenced xmlrpc-c library from sourceforge.net in order to use xmlrpc-client. my question is how can I distribute this library so other users don't need to download/install package from internet. If its possible that I can distribute it with my .so file - it will be best.
stackexchange/codereview
In WPF application I use Textbox with custom style in which ContextMenu is overriden like this: <Style TargetType="{x:Type TextBox}"> <Setter Property="ContextMenu"> <ContextMenu> <MenuItem Header="Copy"/> </ContextMenu> </Setter> </Style> This works perfectly until I'll run window with...
stackexchange/codereview
Hi I have two tables which are related in the following way : Table1 gene goterms ape 1a ape 1b ape 1c boy 2a boy 1a cat 1a cat 1c Table2 gene gene count ape ape 3 ape boy 1 ape cat 2 boy ape 1 boy boy 2 boy cat 1 cat ape 2 cat boy 1 cat cat 2 now,i need value that correspon...
stackexchange/codereview
When I type it here :- <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> <link href="Skins/SkinCustom/Editor.Default.css" rel="stylesheet" type="text/css" /> </asp:Content> Its says Element Link cannot be nested within div...how am I supposed to link my css files ??
stackexchange/codereview
I am attempting to write a JS function (using prototype in rails) that will show hidden divs within a li when that li is mouseover'ed. Each li has a unique id that is a number, like so: <li id="100"> <div style="display:none;" id="hover-display-content">Content</div> <div style="display:none;" id="more-hover-displa...
stackexchange/codereview
I have a web form and I use jQuery/AJAX/JSON to send objects to a web service using: $.ajax({ type: "POST", url: "SynchroniseCustomers.asmx/synchroniseCustomers", data: JSON.stringify(customerObj), contentType: "application/json; charset=utf-8", dataType: "json", error: function (xhr, status) {}, success: function (msg...
stackexchange/codereview
bool fp[81]; From my understanding fp should use ceil(81/8) bytes because it is in succession. Am I correct? How can I prove this?
stackexchange/codereview
Our database is designed based on EAV (Entity-Attribute-Value) model. Those who have worked with EAV models know all the crap that comes with for the purpose of flexibility. I asked my client about the reasons why using EAV model (flexibility), and their response was: Their entities change over time. So, today they may...
stackexchange/codereview
I m very impressed with the idea of stackoverflow, the way they provide the options to login to the users is very easy for any user. And if I have to do the same thing in my website then how its going to be. what will be the coding structure and coding snippets for the same in php , mysql and javascript (ajax). https:/...
stackexchange/codereview
Here is the code for App.xaml: <!-- <XmlDataProvider x:Key="BookmarkData" Source="testData.xml" XPath="/Favourites"/>--> <XmlDataProvider x:Key="BookmarkData" XPath="/Favorites"> <x:XData> <Favorites> <Bookmark> <Title>Google</Title> <URL>http://www.google.com</U...
stackexchange/codereview
Let's say you have two different C# classes A and B that while not deriving from the same base class do share some of the same names for methods. For example, both classes have a connect and a disconnect method, as well as several others. I want to be able to write code once that will work with both types. Here is a s...
stackexchange/codereview
I am working on script where I have code like this... $(document).delegate(scroll.links,'click',function(){ switchTo(getId(this.href)) return false }) I want to convert it into .live I tried but couldnt get it right. Can anybody show me ? Thanks.
stackexchange/codereview
In my html content, i want to replace all "bold" text with "italic" existing in between script tag using c#. I have two option here for applying regular expression a) replace all between script tag b) replace all before the ending of script tag So what will be the regular expression using any method?
stackexchange/codereview
I'm developing a mobile version of a web app that uses single signon. How do I use Single sign-on on native iPhone app?
stackexchange/codereview
I have a data object Data = class public s: string; i: Integer; end; with many of them in a list (or some collection): var ol : List<Data> := new List<Data>; ol.Add(new Data(s := 'One', i := 1)); ol.Add(new Data(s := 'Two', i := 2)); ol.Add(new Data(s := 'Three', i := 3)); ol.Add(new Data(s := ...
stackexchange/codereview
I have more of a "what-would-you-do" question than an actual coding question. It relates to a project I am currently working on. In this project, we are tasked with combining several marketplace APIs into one interface. Each API has its own unique way of categorizing products. The top-level parent categories for all ...
stackexchange/codereview
[11] tells: "In a nonclustered index, the leaf level does not contain all the data. In addition to the key values, each index row in the leaf level (the lowest level of the tree) contains a bookmark that tells SQL Server where to find the data row corresponding to the key in the index. A bookmark can take one of t...
stackexchange/codereview
I know that we use GET function to get the variables from the url in php when we use the GET method to pass data across pages or within the same page. However $obj = new BlahBlahName($_GET); what does this do?
stackexchange/codereview
Somehow, I'm getting a null pointer exception here with JDK 1.6.0_14: HttpSession session = request.getSession(true); LinkedList<MyObject> list = (LinkedList<MyObject>) session.getAttribute(MY_LIST_KEY); .... list.addFirst( new MyObject(str1, str2, map) ); Then, I get this: at java.util.LinkedList.addBefore(LinkedLis...
stackexchange/codereview
In various Scala literature I see some self-type annotations using "this" and others using "self": trait A { this: B => ... } trait A { self: B => ... } Is there any real difference between using "this" or "self"? Does it matter at all what name you use? Is this just as valid? trait A { foo: B => ... }
stackexchange/codereview
could someone instruct me how to Grape-include HtmlUnit in a Groovy (1.7.5) script so that it actually works? Here's what I'm doing: @Grapes([ @Grab('net.sourceforge.htmlunit:htmlunit:2.8'), @GrabExclude('xml-apis:xml-apis') ]) import com.gargoylesoftware.htmlunit.* def client = new WebClient(BrowserVersion.FI...
stackexchange/codereview
I need a regular expression to detect at least one number in a string. Other characters can be anything. Please help me to implement this in objective C. Regards, Dilshan
stackexchange/codereview
I'm a Flash developer looking to get into Android/iPhone game development. Android is more important to me, because I don't have any iOS device to test on, and I don't really like apple either :P (could you blame a flash developer for that?) What is a good game framework for developing android games? Multi-platform is ...
stackexchange/codereview
Surprizing little documentation on setting this up, so I'm sure this is a setup problem. Steps to reproduce: Open terminal (p4.exe in PATH) type p4 [RET] Hangs indefinitely. When I issue commands from emacs (ie p4 edit [file] it eventually comes back with Perforce client error: Connect to server failed; check $P4POR...
stackexchange/codereview
I'm doing private void doSomething(ScrollableResults scrollableResults) { while(scrollableResults.next()) { Object[] result = scrollableResults.get(); String columnValue = (String) result[0]; } } I tried this in two computers It works fine. It is a Windows 7. System.getProperty("file.encoding") ...
stackexchange/codereview
I know that console.foregroundColor takes a ConsoleColor enum as a parameter. What I do not get is why - I guess these are strings so when console.foreground recieve it as an argument, it will use some kind of switch based on these constants. Is it right? Or is there something I have missed?
stackexchange/codereview
I'm just coming into a company on what is essentially my first gig as a team member rather than the sole Windows developer, and I'm not liking the current version control setup. We're developing for Windows machines using VB.net at the moment, with live software dating back to VS2005, being updated to newer Visual Stud...
stackexchange/codereview
Could someone guide me on this. I am using EntityFramwork4 , I want to get the ID of the last row of a table. Could someone having experience using this tell me , how can i get the last id from a database table.
stackexchange/codereview
I have this file upload and it works in Firefox fine, but when I upload file n IE and filename has umlauts, then filename is corrupted. After file is uploaded I echo filename and filename is corrupted like in my example. Example: ä.png is converted to ä.png
stackexchange/codereview
I need to make an image change its size according to the window size, that is, if the window is re-sized the image needs to be re-sized to fit the window. This problem is easy enough with Chrome and Firefox, I just set 'width=100%', but IE isn't as kind... This problem was raised several times, but I couldn't find a c...
stackexchange/codereview
I want to replace the text PATHTOEXPORT with the contents of a variable passed on the command-line that would have a folder path in it (for example, /Dev_Content/AIX/Apache) I came across this article that discusses how to use sed to replace a value in an XML file with another. However, not having used sed before, I'm ...
stackexchange/codereview
In sharepoint 2010, with Admin login can view master page changes in parent and child sites(i.e. all) but others users (who are readers, contributers,etc)login can view changes in Child sites but not parent sites. Please help me. thanks in advance.
stackexchange/codereview
I'm trying to use the following instructions to embed the Mono runtime in a C++ program. http://www.mono-project.com/Embedding_Mono To initialize the runtime, you have to call mono_jit_init with an input parameter called file_name. They say that file_name is the name of the main assembly file. - What do they mean by "...
stackexchange/codereview
I have lines that are programmatically defined by my program. what I want to do is render a brush stroke along them. the way I think the type of brush I want works is, it simply has a texture, mostly transparent, and what you do is, render this texture centered on EVERY PIXEL in the path, and they blend together to cr...
stackexchange/codereview
Im currently trying to use a jQuery plugin: jQuery Autocomplete Tokenizer Now after posting back the page, I want to re-load the values back into the textbox for whatever items had been entered. Now the jQuery on the page is like below: $(document).ready(function () { $("#<%=txtPeople.ClientID %>").tokenInput("...
stackexchange/codereview
How do I open different websites from the same physical directory and different Default documents in IIS7?
stackexchange/codereview
I've been trying to set up nginx 0.8.53 and passenger 3.0.0 on my dev environment - osx snow leopard and REE. I manually compiled nginx with the passenger module linked in. When I tried running passenger, it had a problem - ENV['PATH'] appeared to be null, so the split on it when call PlatformInfo.find_command raised ...
stackexchange/codereview
function mystery($y, $m, $d) { $a = 0; $b = 0; $c = 0; if($m < 3) { $a = $m + 10; $b = ($y-1) % 100; $c = ($y-1) / 100; } else { $a = $m - 2; $b = $y % 100; $c = $y / 100; } $w = (700 + (((26*$a)-2)/10)+$d+$b+$b/4+$c/4-(2*$c))%7; echo $w; } One of my tutorial questions ask...
stackexchange/codereview
I'm not sure I quite understand the difference. WebDriver API also directly controls the browser of choice. When should you use selenium remote control (selenium RC) instead ? Right now, my current situation is I am testing a web application by writing a suite with Selenium WebDriver API and letting it run on my comput...
stackexchange/codereview
Background: I'm making a compiler, the scanner and parser is already done. We have our formal grammar, which defines a program as: program = declarations procedureDeclarations main  (  ){   declarations statementSequence } So you can notice that declarations can be either global or local to the main m...
stackexchange/codereview
I have to write an application for a friend to use in his business - so it won't be on the App store. How do I go about deploying it and distributing this app? Would he require a enterprize licence? And where/how would he download it to his device for testing purposes?
stackexchange/codereview
Hot code replace is no longer working for me in Eclipse for Groovy. I have a project with a mix of Groovy and Java files. This morning hot code replace worked, but now it doesn't work for Groovy. It still works for Java files. I'm not sure what the difference is that made it stop working. Any suggestions?
stackexchange/codereview
I have two different project A & B. Inside the project A I link the source from project B so activity from project A can start the activity from project B. I'm using Eclipse Galileo. The problem is, when I want to edit the value of a view in activity B, the resource id from both projects have some conflicts in it. So w...
stackexchange/codereview
Possible Duplicate: Protecting client side logic & data How can I block other from reading my JavaScript through view source? My thing is, now one can access my JavaScript, because am not sure, but just guess some one from outside using some tool to changing my JavaScript events. So how to make the authenticated?
stackexchange/codereview
i cal upload images to folder if i use absolute url. but how to use absolute url? function do_upload() { $config['upload_path'] = 'upload/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this->load->library('upload',...
stackexchange/codereview
I am using cakephp. And I have textarea field where users paste data, I using tinymce plugin to format text. I have warned users not to enter telephone number or email address inside the textarea. But, I dont want to take chances. Is there a way I can extract the telephone number and email from textarea and replace it...
stackexchange/codereview
I have the following piece of code: <form action="/fake" > <div id="root"> </div> </form> <script type="text/javascript"> var root = Element.extend($("root")); function addTextControl() { var textCtl = new Element('div', { 'contenteditable': 'true'}).update("Next page"); root.appendChi...
stackexchange/codereview
I have a small problem with make and mingw. I usually use Linux and I am not really familiar with windows way of doing. C:\MingGW\bin is in my path (I can launch directly g++ or sh by the windows command line) but when I try to type make I have the following error : make: g++: command not found I do not know which mak...
stackexchange/codereview
I am using code from a CVS controlled repository (@sourceforge). Instead of using it directly, I was using a git clone of it made by someone else. In my clone I have several modifications. In the meantime the upstream project has switched to SVN (@googlecode). I was able to create an automatically updated git clone of ...
stackexchange/codereview
I have an SQLite database with the following fields for example: date (yyyymmdd fomrat) total (0.00 format) There is typically 2 months of records in the database. Does anyone know a SQL query to find a weekly average? I could easily just execute: SELECT COUNT(1) as total_records, SUM(total) as total FROM stats_adsens...
stackexchange/codereview
In MSTest you can do something like: [TestMethod] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "testdata.csv", "testdata#csv", DataAccessMethod.Sequential)] public void TestSomething() { double column1 = Convert.ToDouble(TestContext.DataRow["column1"]); ... Assert.AreEqual(......
stackexchange/codereview
I have a treeview that represents different filter items to a set of records. At runtime, I am setting each node's tag to a Func type. For example: myTreeView.Nodes.Add(New TreeNode("Node1")); myTreeView.Nodes["Node1"].Tag = New Func<MyRecordType, bool>(p=> p.Title == "test 1"); myTreeView.Nodes.Add(New TreeNode("Node...
stackexchange/codereview
does anyone know how I can configure my rails model, which is using paperclip for data storage, to use creation date based directories like for example in fleximage ?? At present I'm using: has_attached_file :bookblock, :path => "#{CONF['storage_path']}bookblock/:id_partition/:style.:content_type_ehas_attached_filexten...
stackexchange/codereview
Using the HTML Agility Pack is great for getting descendants and whole tables etc... but how can you use it in the below situation ...Html Code above... <dl> <dt>Location:</dt> <dd>City, London</dd> <dt style="padding-bottom:10px;">Distance:</dt> <dd style="padding-bottom:10px;">0 miles</dd> <dt>Date Issued:</dt> <dd>...
stackexchange/codereview
I have this for: for i in `ls -1 access.log*`; do tail $i |awk {'print $4'} |cut -d: -f 1 |grep - $i > $i.output; done ls will give access.log, access.log.1, access.log.2 etc. tail will give me the last line of each file, which looks like: 192.168.1.23 - - [08/Oct/2010:14:05:04 +0300] etc. etc. etc awk+cut will extrac...
stackexchange/codereview
In an Oracle package I have defined a type type setTable is table of my_sets.pkey%type; in the package declaration (the non-body part). The pkey column referenced is a number(38). Then in a function in the package body I have ... with d as (select column_value from table(sets)), ... where sets is a parameter to th...
stackexchange/codereview
Actually i want to apply a loop on accelerometer, means i want to start a accelerometer on behalf of loop. if i want to start loop one then want to perform accelerometer reading one time. if loop will run twice then want to run accelerometer twice. But it not happens. What should i do to control accelerometer. Have a ...
stackexchange/codereview