instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm trying to define a regex pattern with a negation within the pattern. I want to exclude all strings with 'Test' on the end. I'm aware about the character negation [^Test] but this is not what I'm looking for, [^Test] is equal to [^estT]. It should pass for strings like UserService and not for UserServiceTest. So wha...
stackexchange/codereview
I am currently using the ASP.NET MVC framework on a project (pretty much my first time) I am using Linq2SQL as my data model.. Where should i have this kind of code: var entries = from e in db.sometable select e; I currently have this kinda code in the controller and pass the data i get into the view.. is this ok? if ...
stackexchange/codereview
Is there a way or formula that could move a certain row to a different sheet by just typing in the criteria and pressing enter? Like if I have 3 sheets and one of the columns on each sheet was called status, and in this column I type COMP, could it move all the information to a sheet called COMP sheet?
stackexchange/codereview
I have a list of "Report" objects with three fields (All String type)- ReportKey StudentNumber School I have a sort code goes like- Collections.sort(reportList, new Comparator<Report>() { @Override public int compare(final Report record1, final Report record2) { return (record1.getReportKey() + record1.getStude...
stackexchange/codereview
One of our web applications just went through 508 compliance testing. We use TinyMCE version 3 for content development and I understand it generally has good accessibility. However, one of our pages contains 3 or more TinyMCE instances each preceded by a label indicating what the TinyMCE instance is for but we are bein...
stackexchange/codereview
Im on unix platform. The memory of a process with a memleak is cleaned at process termination. What about a process, that has spawned a child, where the child has a memleak. Will the leaked memory be cleaned up at childprocess termination? Or will this memory now stick with the parent process. Thanks
stackexchange/codereview
We have a CMS built entirely in house. I'm the new web developer guy with literally 4 weeks of ColdFusion Experience. What I want to do is add version control to our dynamic pages. Something like what Wordpress does. When you modify a page in Wordpress it makes some database entires and keeps a copy of each page when y...
stackexchange/codereview
I am planning to write a piece of code using the media foundation API which is available after vista. I want to add the code inside a #if block something like... #if <SomeMacro> // all the classes using MediaFoundation go here. #endif I could not find a macro to detect the operating system version. How is this normall...
stackexchange/codereview
What is the easiest way to parse XML in ActionScript3/Flex ?
stackexchange/codereview
I have a collection of html files that I gathered from a website using wget. Each file name is of the form details.php?id=100419&cid=13%0D, where the id and cid varies. Portions of the html files contain articles in Asian language (Unicode text). My intention is to extract the Asian-language text only. Dumping the rend...
stackexchange/codereview
I am using hibernate 3.5 and Spring 3.0.4. I have some old tables and some new tables that need to different NamingStrategies. I declare a sessionFactory in spring with a namingStrategy; <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSou...
stackexchange/codereview
I'm a French Computer Science Student. I've a project to do, create a simple application for login into my website, display (if login is correct) a New activity with 3 tab (each tab contains an activity). The application will be structured like this: First Activity: Login. If it is correct, go to the 3 tab activity. Fi...
stackexchange/codereview
Say I'm going to subtract: 0000 0000 - (-1) that is: (two complement) 0000 0000 - 1111 1111 --------- = ???? ???? Whats gonna happen, my brain is really f***ing with me right now, it went perfectly fine before, I think its the overflow thats screwing me up, can someone give some clearance on this p...
stackexchange/codereview
I’m interested in the topic of Rails security and using Security on Rails. I'm on Implementing RBAC /page 142/ and i cannot get past the error in the subject. Here is the code: module RoleBasedControllerAuthorization def self.included(base) base.extend(AuthorizationClassMethods) end def authorization_filte...
stackexchange/codereview
I need to pass the value of a php json object to javascript. This is how I am doing it; <script type="text/javascript"> var msg_top = <?php echo searchResults('windows');?>; </script> This is php SearchResults function that returns json: function searchResults($q) { $host = "http://search.twitter.com/se...
stackexchange/codereview
I'm looking for code which can do the following. Given a snippet of XML, say: <c>Some text</c> and a complete XML file: <a> <b> <c>Some text</c> </b> </a> check that the snippet is indeed a valid subset of the complete XML file. I've been looking at XMLUnit which looks really good, but it seems to only ...
stackexchange/codereview
I followed THIS but had no luck. My .jsp file has in head tag: <s:head theme="ajax" /> and in body tag <s:datetimepicker name="dateOfBirth" label="Format (yyyy-MM-dd)" displayFormat="yyyy-MM-dd"/> But it is not showing, here is the picture: My generated HTML source code contains all necessary lines like in example ...
stackexchange/codereview
I think I got it wrong at the 'resultset'. My code for inserting data is : ResultSet columns = statement.executeUpdate("INSERT INTO Feedback (Username, Feedbacks) VALUES( '" + user + "','"+ msg +"')"); The compilation error is: Type mismatch: cannot convert from int to String Can you help me?
stackexchange/codereview
I've got a speed question. I have a bash script which parses information from TheTvDb.com. It downloads nearly 40,000 lines of data, then reduces it down to about 5000 lines of data which gets written to the hard disk. Then it reads the file and parses it into several files which are used later as a lookup table. I...
stackexchange/codereview
Here is my code (starting with line 35): location / { index index.php; root /home/body; if ($request_filename !~ (js|css|images|robots\.txt|index\.php.*) ) { rewrite ^/(.*)$ /index.php/$1 last; } } Here is the error: [emerg]: unknown directive "location" in /opt/nginx/conf/nginx.conf:35 Can anyone hel...
stackexchange/codereview
Is there a way to connect to a network drive that requires a different username/password than the username/password of the user running the package? I need to copy files from a remote server. Right now I map the network drive in Windows Explorer then do I filesystem task. However, eventually this package will be ran ...
stackexchange/codereview
In my web app I use several CSS classes to write less code. I use them quite often in the markup to add single property or two in some cases. These are the following .clear { float: none; clear: both; } .fl_l{ float: left; } .fl_r{ float: right; } .ta_l{ text-align: left; } .ta_r{ text-align: right; } .no_td:hover { te...
stackexchange/codereview
I have a little application running on Linux and want to port it to Windows. I found that with Cygwin i will be able to do it simple by linking the application with the cygwin1.dll library which make available a lot of the POSIX and other standard functions. I read the FAQ and the User Guide on the site of Cygwin but d...
stackexchange/codereview
I want replace every second white space with "," using preg_replace. And input string like this: $string = 'a b c d e f g h i'; should result in an output like this: a b,c d,e f,g h,i thanks
stackexchange/codereview
So I'm trying to parse some of the WootAPI with XPath. A problem that I'm running into is that a couple of the elements have colons in their name, such as woot:price or woot:condition. Now, trying to use the XPath //rss/channel/item/woot:price won't grab the contents of the element woot:price, because of the colon, I t...
stackexchange/codereview
I'm making a web app that requires that I check to see if remote servers are online or not. When I run it from the command line, my page load goes up to a full 60s (for 8 entries, it will scale linearly with more). I decided to go the route of pinging on the user's end. This way, I can load the page and just have them ...
stackexchange/codereview
Possible Duplicate: How to expand 'select' option width after the user wants to select an option I have a dropdown with reasonabily long text in it. it display fine in firefox but showing trimed text with respect to its size when i click on it in Internet explorer. <select style="width:100px;" id="test"> <option>123...
stackexchange/codereview
SELECT SearchTerm, CustomerID, CreatedOn FROM SearchLog WHERE CreatedOn >= DATEADD(DAY, DATEDIFF(Day, 0, GETDATE()), -5) GROUP BY SearchTerm, CustomerID, CreatedOn I want to add one more column, which will be COUNT(SearchTerm) and I want to order the query by the searchterm which is mostly searched for. a...
stackexchange/codereview
I'm using apn_on_rails to handle push notifications with my Rails app, but I'm not sure how to see what the response from Apple's servers are (for debugging purposes). Any ideas how to do that?
stackexchange/codereview
hi i wana know how to use standard numeric input for a user to just enter numbers in the entering field in c or c++? Any one who told me any string or way with if else or switch or ternary operators.
stackexchange/codereview
I am attempting to use My.Computer.Network.DownloadFile to download a file from an ftp server. Everytime I attempt to download the file using: My.Computer.Network.DownloadFile("ftp://xxx.xx.xxx.40/datafiles/sm/viewcontrol.ip","c:\rdp\viewcontrol.ip","username","password",false,10000,true) I receive the following error ...
stackexchange/codereview
Im trying to display multiple MPMoviePlayerController views within a uiscrollview. My app displays a gallery style player for movies, the same as the Photos app. Having read the documentation I understand only one video can play at once, which is fine. Unfortunately, Im seeing that even the controls are not displayed -...
stackexchange/codereview
1000 ...some data <component id="2"> ...some data </component> .... .... <component id="10"> ...some data </component> </components> I have the above XMl and I want to fetch data from...
stackexchange/codereview
Is there an API or webservice we could use to get statistics about an app in the Android Market? Like AndroidZoom.com and AndroLib.com. Both sites have a lot of info about apps. Where did the data come from? Thanks for replying. Regards, Rick
stackexchange/codereview
Can I extend a lifetime of a Memcached item without actually getting it? Sure, I can get the item, set it again and increase a lifetime. However, this way I'll have to copy the object to script's memory first, which is not good from the perfomance prospective.
stackexchange/codereview
I have created an Asynchronous version of Rails 3 that I would like to integrate with a WebSocket implementation. I am using EventMachine, Ruby 1.9, Fibers and various em-flavoured libraries as documented by the wickedly good Ilya Grigorik. I have been looking at em-websocket as the handler for WebSocket connections bu...
stackexchange/codereview
How can I use a templateize::$subject in a $html = <<<HTMLDOC abc+abc+ab templateize::$subject HTMLDOC; in a HTMLDOC content?
stackexchange/codereview
i am looking to create a drop-down list of items in excel through automation in C#, the items are taken from the values in the whole column throughout the file. The same functionality of right click on a cell and click "Create List" I looked a bit through the internets but nothing works, i saw you could do this via Da...
stackexchange/codereview
I have a running Java GWT application, that I can compile using Eclipse. Now I wan't to also be able to build this application from the command line using ant. As of my understanding I therefore need a build.xml file. I used the webAppCreator tool, that comes with the SDK to create this build.xml file and adapted it to...
stackexchange/codereview
I would like to know the advantages and disadvantages between C++ and VB6. The reason I am asking is because I came across a website where they have source code for various programs that are coded for Windows machines, and they are almost all coded in VB6. However, I do not know a lot about VB6, and am trying to learn ...
stackexchange/codereview
Using PHP and simplexml if possible, I'd like to parse the following example document to extract the whole value of what is contained within the text tag, including the paragraph, content, and whatever else tags are there. <section> <id root="71EB365C-A4F5-D758-0C51-B8DA375805CD" /> <code code="34066-1" codeSystem="2...
stackexchange/codereview
I want to make a mysql consult sending a variable from ajax to php. I think the code explains better by itself <script type="text/javascript" src="jquery.js"></script> <?php include "w_config.php"; //only a local php lib, you can ignore //the function query only returns the query result print_r(query("select * from art...
stackexchange/codereview
<img src="xxx" alt="xxx" title="xxx"> <div class="buttons"> <a href="xxx"><img src="xxx" alt="xxx" title="xxx"></a> </div> I need to write a jQuery selector, that will select ONLY images with title attributes that are OUTSIDE the .buttons div. I know that to select images with title attributes I need to use someth...
stackexchange/codereview
I'm working through a CSV importing approach that I want to teach to other people I work with where I'm concerned with the following: Validating each record before attempting to process (e.g. persist). Failure on any record prevents processing. Providing status during validation and processing. What I'm looking fo...
stackexchange/codereview
I have been coding up Java with Netbeans for about a year now, and have written a lot of data manipulation code which plots graphs on-screen. I generally plant a JPanel object in my main window, write custom painting code, and call the repaint() method as needed. But today, for the first time, I tried to invoke a repai...
stackexchange/codereview
Controllor: def new(user) @address = Address.new @address.user_id = user.id end The link I click that triggers the error <%= link_to "Add Address", new_address_path(current_user)%> Address model belongs_to :user User Model has_many :addresses New Address View <h1>New Address</h1> <% form_for @addre...
stackexchange/codereview
any tool, ide or whatever to search files where there are elements of a class o id? I would insert the class or the id to the search engine. Regards Javi
stackexchange/codereview
I have a form with many hidden fields. When a user selects text from the form and pastes it in to a text editor - they can see the values of the hidden fields. This doesn't happen to everyone. However, for the users that are experiencing this, they experience it across all browsers. I haven't been able to replicate thi...
stackexchange/codereview
Is there big difference between those two?
stackexchange/codereview
hey, i'm wanting to create a basic pagination affect.. i have (lets say) 100 posts. i want to show the first 9, so therefore hide from 10 - 100 how do i grab those children. my next request to have in mind is obviously to hide 1-9 show 10-18 hide 19-100 you get the idea. thanks in advanced. mark up along the lines of: ...
stackexchange/codereview
I use Eclipse for coding, but I have a problem. When I debug a C++ project, Eclipse automatic switches to the Debug perspective, but I don't want the automatic switch. How can I disable the automatic switching?
stackexchange/codereview
In this example the IsEnabled property of my button is bound to the selected rows "Local" property of the grid and it works just fine: <Button DockPanel.Dock="Bottom" Width="100" Height="100" IsEnabled="{Binding ElementName=dataGridRestore , Path=SelectedItem.Local}"></Button> <my:DataGrid x:Name="data...
stackexchange/codereview
I want to save an integer variable, so that it can be retained even after the C program is restarted. The way is to store it in a file. But it is just an integer variable. In the file if I write 1000 first and replace it with 12, it saves as 1200, how can I delete the old value which was there in the file and write th...
stackexchange/codereview
I need to translate this SELECT to ActiveRecord but I don't get the desire result. Can you help me? The SELECT is: SELECT SUM(quantity) FROM (SELECT recipients.lang,COUNT(name) AS quantity FROM messages, recipients WHERE messages.lang=recipients.lang AND active=1 GROUP BY lang) AS temp; Thank you very much.
stackexchange/codereview
Assuming i have a 1 million 10 digit unique numeric numbers. If i do a str_shuffle for each of the 1 million numbers , will the uniqueness still be maintained???? Please suggest Thanks guys for some clarity,but the problem still remains.Actually, the million nos that i am talking of are all uniques numbers(infact the...
stackexchange/codereview
I have a program written in C# and values calculated by praat (phonetics software). I already have a praat script running with praatcon.exe which prints the results on a Windows console (cmd.exe). Can I use this result in my C# application? How? Or is there a better way to get the results, e.g. with the command "sendso...
stackexchange/codereview
I want to be able to disallow images (and other stuff) from being dropped into a content editable div across browsers. I see how to do it for Chrome and IE. Firefox stubbornly refuses. The code snippet at http://jsbin.com/oqozo3 has an example which shows that the event is firing, I am cancelling it, and in Firefox ...
stackexchange/codereview
I need help regarding UIPickerView, in my application i have to display UIPickerView with available countries . If any body has already implemented country picker please share the code. Thanks
stackexchange/codereview
I'm using a plugin in which file.is_image is used. Somewhere, I reckon is_image ought to be defined. How do I find out what it is defined to? I'd reckon it should be something like "$is_image =" or something like that, I'm not great with JavaScript syntax etc.
stackexchange/codereview
I have to design a control_panel form. This will have many tabs. How should I design this? Should I make different new forms for each tab or is there a concept of Masterpage in C# WinForms? Please give me your opinions. Thanks.
stackexchange/codereview
I am passing a date in "Y-m-d H:i" format to strtotime and it is returning 5hours 30 minutes less in result.
stackexchange/codereview
I am making a page and using canvas.. So in the body part i am doing something like this: <body> <canvas id="myCanvas" width="1300" height="1150"> </canvas> <img src="arbit.png" width ="1000" height="1000" /> </body> But the image is loading after the canvas space and the drawing on canvas is appearing above the i...
stackexchange/codereview
I'm hoping to make a <td> cell click-able with the link that is inside it. Code: <td class="block"> <a href="expansion/r10_01.htm">text goes here</a> </td> So when the user clicks anywhere in that cell the link activates rather than just on the text. There are various margins and padding set on the cell that stops...
stackexchange/codereview
I am working a physics coursework, and I am currently stuck at this section. I've trying but I couldn't get it right. Really need help here. Its about the trapezium rule, Question: What is the value of the integral in equation f(x)=x4*(1-x)44/(1+x^2) this is the code I've tried, but I can not get the answer from math ...
stackexchange/codereview
I am trying android samples and i am wondering how to modify the dictionary list (database). I can't seem to find the database file. In the raw folder there is the definitions.txt, i tried to modify this but it doesn't seem to affect the search results. please help. many thanks.
stackexchange/codereview
(edited) I want to display a dynamic list of JPanels that hold textfield that the user can modify. I am having trouble deciding how to design my GUI. Should I display each JPanel in a JTable or a JScrollPane? The JTable approach, from what I understand, is more memory efficient and faster because I have the getTableCel...
stackexchange/codereview
I'm trying to understand how deadlocks can be managed using ESQL. I created 2 concurrent processes that try to update a "customers" table, exactly like the example given in O'Neil's book "Database": http://books.google.ca/books?id=UXh4qTpmO8QC&pg=PA298&lpg=PA298&dq=%22deadabort%22+oracle&source=bl&ots=2QF7eSbaW6&sig=Ic...
stackexchange/codereview
I think the topic explain what Im looking for : template.xhtml <div class="content"> <ui:insert name="content_homepage">Box Content Here</ui:insert> </div> index.xhtml <ui:composition template="./template.xhtml"> <ui:define name="title"> JSF - The Sinfonet Portal </ui:define> <ui:define name="...
stackexchange/codereview
I have a java class that I am importing unfortunately named java.net_y. My code compiles, but when I try to run it I get: Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.net_y I've read other threads about trying to override core java classes like java.io.....thats not what I am ...
stackexchange/codereview
I am having an issue that is only affecting this application in it's production environment. We have a single controller action that is used to "clone" article objects by creating a new object, setting the attributes equal to each other, then adding the images to the object. Here is the portion of the controller that ...
stackexchange/codereview
I have one of these moments when something seems so simple but I just can't seem to find the right query. I am looking for a query that checks if a certain many-to-many relation already exists. Consider the following table: +---------+---------+ | feed_id | coll_id | +---------+---------+ | 1 | ...
stackexchange/codereview
I have created a gtkMenu using gtk.Menu(), appended a couple of items and now I want to remove some menu items. How can I do that?
stackexchange/codereview
I have this string: videos/000/000/021/10f43ddb37472ee4bb57_original.m4v I need this part: videos/000/000/021/ So format is: videos/{3 digit number (000-999)}/{3 digit number (000-999)}/{3 digit number (000-999)}/
stackexchange/codereview
I have the following query that basically loads huge amount of data into my database: LOAD data local INFILE '/Users/Masters/Model/quotes/sp500hst-1.txt' INTO TABLE quote fields TERMINATED BY ',' ENCLOSED BY '' LINES TERMINATED BY '\r\n' (quote.date,quote.ticker,quote.open,quote.high,quote.low,quote...
stackexchange/codereview
Setup: I'm looking for insight into using a ABPersonViewContoller without getting data from the AddressBook. I have a JSON web service that is feeding a tableview and I have my person objects stored in a mutableArray as dictionaries. my Question: I've been searching and been unable to find any reference to using the pe...
stackexchange/codereview
I would like to do a tutorial in a page, so my idea is to create some kind of "mask" that disable all the page and enable just a "invisible" box, where things (links and other stuff of the page) works. It's like a "ozone hole" where links and stuff works, but if you click anywhere else on the page, the click is "captur...
stackexchange/codereview
I have written a little list menu with expandable categories using this little piece of jQuery $("#menu ul li ul").hide(); $("#menu ul li").click(function() { $(this).find("ul").slideToggle(); }); There is a full jsFiddle of the menu here: http://jsfiddle.net/AlexSadler/uRwh7/7/ The only problem is that when one ...
stackexchange/codereview
I read some questions already posted here regarding Soap and Rest and I didn't find the answer I am looking for. We have a system which has been built using Soap web services. The system is not very performant and it is under discussion to replace all Soap web services for REST web services. Somebody has argued that Re...
stackexchange/codereview
Possible Duplicate: Autosizing Textarea Hi, I have developed a web form where one field is description. I want that field to be bigger in size, so that users can see the full description. How do I do that? Thanks
stackexchange/codereview
I want to play an MP3 file using the default Android player. I managed to get the file playing but it plays in the background. I want to have all the nice controls for pausing, playing, etc. My code now is something like: String link = "http://www.example.com/file.mp3"; MediaPlayer mp = new MediaPlayer(); mp.setDataSo...
stackexchange/codereview
I have a "title" attribute inside elements of my UTF-8 xml, e.g. <tag title="This is some test with special chars §£" /> as I want the content of this attribute to be printed directly in an HTML page, I'm trying to have an output like: <tag title="This is some test with special chars &#x00a7;&#x00a3;" /> The code fra...
stackexchange/codereview
I want to compute Hash of a String, but the Hash value should be a number (long or integer). In other words I want to compute integer hash of a string. Collusion resistance in not the concern. Is there an way to convert MessageDigest of SHA-256 to a number. I am using Java to accomplish this.
stackexchange/codereview
I have an issue with a popup in Asp.net using AJAX. Is it possible to show one kind of popup when the user edits few textboxes and the other kind of popup for the remaining textboxes. I guess it is possible with some javascript function. Couls someone help me out? Thanks in advance!
stackexchange/codereview
Example: list1 = {'52': {'timestamp':'1234567890', 'name':'Jason Bourne'}, '42': {'timestamp':'2345678891', 'name':'Sarah Parker'} } list2 = {'61': {'timestamp':'3456789012', 'name':'Mike Williams'}, '12': {'timestamp':'4567889123', 'name':'Robert Tissone'} } list3 = {'56': {'times...
stackexchange/codereview
Hey guys, I am fairly new to Java, and I have a question about collections and iterators. In my code I have a collection (which somewhere down the road extends extends Iterable) and every object is basically a LinkedList. I need an iterator for that collection, so I've wrote it down this way: public class A{ Link...
stackexchange/codereview
i have a list View in my app (this is the xml layout): <?xml version="1.0" encoding="utf-8"?> <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/arrayList" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textFilterEnabled="true" ...
stackexchange/codereview
I can use the Perl chmod function to set the permission bits, for example: chmod S_IRWXU|S_IRWXG|S_IROTH, $the_dir; How do I add Set Group ID to the directory in the above command?
stackexchange/codereview
Is it possible to add QPushButtons for every item in a QTreeView? For instance, when you click on a TreeItem (that is a button), it's children get displayed as buttons as well? I just have a standard QTreeView. _layout = new QVBoxLayout(this); treeView = new QTreeView(this); QStandardItemModel* standardModel = new QS...
stackexchange/codereview
I would like to write an application/extension that would replace the default explorer right-click context menu with something other than a menu, preferably a custom window. Is this possible, and if so, how?
stackexchange/codereview
I'm working on a currency conversion service with a friend, but have came accross a big problem, near the end of the project. We have 3 tables, currencys (Contains currency code e.g. 'GBP', Currency name, current rate and timestamp), countries (Contains country code e.g. 'US' and the location it refers to), currency_co...
stackexchange/codereview
I am writing a replacement for the sharepoint asset picker dialog with additional features. There is a requirement to browse media libs which are located in other site collections. So I added a configuration page where you can add the URLs to the media libs to the sharepoint property bag. In the custom AssetPicker dial...
stackexchange/codereview
I use this small function in my bashrc to quickly see the source of any custom utility that I use: function wvi() { vi `which $1`; } For example, fvi mysort will open the source of my utility mysort. There is one more thing that I can use here - automatically switching to the directory that utility is present in. ...
stackexchange/codereview
Building on tutorials out there to implement a basic user sign up + log in system with salt. At the moment I'm using this for the sign up stage: define('SALT_LENGTH', 9); function generateHash($plainText, $salt = null) { if ($salt === null) { $salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH); ...
stackexchange/codereview
I would like to be able to write database driven applications (i.e. standalone apps that are not web based and don't require a browser or Apache server to run) I have attempted to do this in Codegear C++ Builder in the past but even though my 'background' is in that (C++ OOP with Borland Builder) it is so far removed f...
stackexchange/codereview
I have the following two queries: SELECT users.* FROM "users" WHERE (fname || lname LIKE '%james%') SELECT users.* FROM "users" WHERE (fname || lname LIKE '%James%') I have a record in the User Table with fname = James The problem I'm having is the first query returns 0 results, and the 2nd returns the correct result...
stackexchange/codereview
We have a company account for the iOS developer program. One of our clients wants to put the app we developed for them up under their own company name, but they've only just sent off for enrollment and as such they want to put the app up under our name until they get their enrollment though. Is it possible to "swap" th...
stackexchange/codereview
I'm trying to pass a TABLE variable to the sp_executesql procedure: DECLARE @params NVARCHAR(MAX) SET @params = '@workingData TABLE ( col1 VARCHAR(20), col2 VARCHAR(50) )' EXEC sp_executesql @sql, @params, @workingData I get the error: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the k...
stackexchange/codereview
In my project, I have a user table where password is MD5 hashed and stored as binary(16). Now I want to write those user data as INSERT queries to a .sql file so that customer can import them back again? Or is there anyway to export those data directly? I tried DTS using from Excel to Access file but when importing, t...
stackexchange/codereview
For example, for the text Mon 01/01/2010 01:00:00 some other text followed, I want to match the date segment only, so I use the following PHP code, $text = 'Mon 01/01/2010 01:00:00 some other text followed'; $pattern = '/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s(0-9\/)+?.*/'; preg_match($pattern, $text, $matches); $date = $match...
stackexchange/codereview
I'm playing back a longish audio file (20 seconds or so) using AVAudioPlayer. I need to be able to pause and start in the middle of the file. When I pause or start while the audio is playing, there's a noticeable "pop" as the audio starts or finishes. I've been able to improve the situation by doing a very fast fade-o...
stackexchange/codereview