instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to use jQuery ajax to get some values from the database and then return them in an array. I have used the same code several times before but this time, no response is being returned. Although the post values are the correct values that I would expect. Here is the javascript code that I am using: $.ajax({ ur...
stackexchange/codereview
SQL Server 2008 R2 Why create table A ( id int, primary key nonclustered (id) ) is correct and executed without errors? But create table A ( id int, primary key nonclustered id ) is an error? giving Incorrect syntax near ')'. Collateral question: Why create table c(id int primary key clustered...
stackexchange/codereview
Within this method: - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath If I call a NSLog it will print out that log when the UITableViewCell shows on the screen every time. I was just wondering if it's possible to load this cell once and not reload it every time it ...
stackexchange/codereview
How can I see if a time stamp was from >= 30 mins ago? Sorry if I am not descriptive enough but idk what else to say.
stackexchange/codereview
There are 3 things I need to do for a project. First of all, I need a php script to generate a text file. The text file must contain a string generated by a RSA key. What's the best way to generate a hash using RSA keys on PHP? The second part is that I need to add an icon to this file. The file is supposed to be used ...
stackexchange/codereview
In SQL it should look like this: SELECT * FROM `categories_description_old` WHERE ((`categories_description` = '') OR (`categories_name` = '') OR (`categories_heading_title` = '')) My (ugly) solution: conditions = [:categories_name, :categories_heading_title, :categories_description] b = table_categories_description_o...
stackexchange/codereview
I am running an ant script using ant -f build.xml. This script is supposed to compile my project and generate a jar file but some seconds after ant starts to generate the jar file, the project gets killed and all I see is the message "Killed" in the console. If I run the same command but with the "-verbose" option, the...
stackexchange/codereview
I need to split a number into even parts for example: 32427237 needs to become 324 272 37 103092501 needs to become 103 092 501 How does one go about splitting it and handling odd number situations such as a split resulting in these parts e.g. 123 456 789 0?
stackexchange/codereview
Using MethodBase, is it possible to get the parameters and their values of the method that's being called? To be specific, I'm trying to use reflection to create Cache keys. As each method and its parameter list is unique, I thought it'd be ideal to use this as the key. This is what I'm doing: public List<Company> ...
stackexchange/codereview
I have written my yaml schema for the database for my Symfony+doctrine application, and I'm trying to get it to make the models and such, but it errors on doctrine:build-model $> ./symfony doctrine:build-model >> doctrine generating model classes >> file+ /tmp/doctrine_schema_89653.yml No yml schema found in /...
stackexchange/codereview
<ul> <li><img /></li> <li><img /></li> <li><img /></li> <li><img /></li> <li><img /></li> </ul> Its a horizontal list, not vertical. How can we enlarge one of the images, when we hover on it?
stackexchange/codereview
This is driving me crazy. Very grateful if someone could help me out! Problem: I have subclassed NSView (and implemented initWithRect: and drawRect:) and connected it to a customView in IB. Then in my Controller.h I am trying to create a reference to this instance by using Viewer *view; (Viewer is my subclass of NSView...
stackexchange/codereview
I am implementing a class that resembles a typical database table: has named columns and unnamed rows has a primary key by which I can refer to the rows supports retrieval and assignment by primary key and column title can be asked to add unique or non-unique index for any of the columns, allowing fast retrieval of a...
stackexchange/codereview
I'm going mad with the following problem which does not happen on any other browser (Chrome, Firefox): IE8 cache is cleared browser starts opens HTML/Javascript page that requests and creates a few images dynamically. This HTML page is served from a Tomcat server localhost:8084. Most of the time out of 10 images that...
stackexchange/codereview
I am writing a stored procedure which collects all changes that were happend in a table for a given date and would like to send recordset to an administrator via email from SQL Batch Job. Now untill now, I couldn't figure out is how to send recordset in an email body. Is it possible to construct email body based on th...
stackexchange/codereview
I'm experiencing an odd problem where my page's SSL breaks in firefox if I incorporate a JQUERY UI Dialog box. Works fine in I.E. 8 and Chrome. I read about an issue introduced by CSS base64 image encoding breaking the SSL but I've tried removing the style sheet completely and the problem still occurs. Has anyone run i...
stackexchange/codereview
So far I have: git rev-parse <tagname> | xargs git cat-file -p but this isn't the easiest thing to parse. I was hoping for something similar to git-log's --pretty option so I could grab just the info I need. Any ideas?
stackexchange/codereview
I'm trying to find a solution for wrapping words that are extremely long within a shoutbox. For example, if someone writes out a filepath or if someone just writes a bunch of nonsense. For example: blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahnonsensenonsensenonsensenonsense The Sh...
stackexchange/codereview
G'day, I have a RadComboBox control inside of a RadGrid that is displayed when the InitInsert action occurs. I'm using Entity Framework as a datasource & the results contained within this are correct. My problem is that when I use findcontrol it returns nothing. If e.CommandName = "InitInsert" Then RadGrid1...
stackexchange/codereview
I have tomcat 7 installed on my windows 7 machine. To start it, I have to start it manually all the time. It does not start when I reboot my machine. Any ideas how to enable tomcat to run automatically when windows 7 boots up or is that not possible in tomcat?
stackexchange/codereview
I have a database with field 'status' which is default 0 when offline and 1 when online. I was wondering if anybody knows a way to update the database in the event of browser close (set the 1 to a 0). It has been suggested that I use a body unload and point to AJAX but i've no idea how to do it...PLEASE help, thank yo...
stackexchange/codereview
What is the best way to check if a user has permission to a site collection/site? I'm currently using the following SPSecurity.RunWithElevatedPrivileges( () => {using (var site = new SPSite(nodeUrl)) { using (var web = site.OpenWeb()) { ...
stackexchange/codereview
I need more control over playing sounds than java.applet.AudioClip provides. All that gives is the ability to play, loop-play, and stop an audio clip. I would like to know how to control on which speaker it plays, what the volume of the sound is, what part of the sound to play, etc. Does anyone have any experience or a...
stackexchange/codereview
I am sending object friend through params[:invitations][:friend]. In my params looks like:#< User:0x6925800>. Can I convert this string to an object in my controller? Why I am sending an object through params? Because I get it from a javascript function that triggers when a field in my dropdown menu is clicked. And if ...
stackexchange/codereview
The following query returns >7000 rows when each table only has 340 rows. SELECT Config.Spec, TempTable.Spec FROM Confg INNER JOIN TempTable on Config.Spec = TempTable.Spec Why would this happen? If an INNER JOIN only returns a row if there is a match in both tables then why would it return multiple rows for a match....
stackexchange/codereview
I have a command which outputs something like that: lucid32 lucid64 I need to read it into array. So in this particular case I need an equivalent of: boxes =(lucid32 lucid64) I tried to read it like that: boxes=(`mycommand list | tr '\n' ' '`) but it returns $'\033'[0Klucid How can I fix that? UPDATED: it looks like...
stackexchange/codereview
I need to search a string for any occurances of another string in PHP. I have some code that I've been playing with, but it doesn't seem to be working. Here is my code: while (list($key, $val) = each($keyword)) { $pos = strpos($location, $val); if($pos == false) { echo "allow"; exit; } else { echo "de...
stackexchange/codereview
I'm working on a custom ServerControl, I've created it like below : [ParseChildren(true), PersistChildren(true)] [ToolboxData("<{0}:Menu runat=\"server\"></{0}:Menu>")] public class Menu : WebControl { ..... [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] [PersistenceMode(Persis...
stackexchange/codereview
Possible Duplicate: ASP.NET Menu Problem With .swf file I have a problem in ASP.NET Menu with Flash file. i have added a .swf file into my asp.net webpage, when ever i view the menu it goes behind the .swf file.Could you plz tell me how to solve this problem... thanks in advance...
stackexchange/codereview
My 'VIEW' is ordered. But when I use a select to show its result, the output is shuffled. This behavior also happens with the following statement SELECT * FROM (SELECT * FROM TABLE ORDER BY COLUMNA) AS DERIVEDTABLE How to prevent this shuffling?
stackexchange/codereview
I want to add persistance storage to my struts2 app. Where is the best place to start ? I suppose I am looking for a good hibernate tutorial ?
stackexchange/codereview
I have a problem using a class of made of structures. Here's the basic definition: using System; struct Real { public double real; public Real(double real) { this.real = real; } } class Record { public Real r; public Record(double r) { this.r = new Real(r); } pu...
stackexchange/codereview
Greetings I tried to integrate http://mapas.sapo.pt/api in android with phonegap but all that I was getting was a Blank Space. I am noob into phone gap and I would be very please if someone could give me a little explanation why does it happen ;) thanks in advance
stackexchange/codereview
I have some problem with generics and collection. Java support generics only at compilation level. So we can't use case B. { foo(new HashSet<I>()); //case A foo(new HashSet<C>()); //case B: wrong } void foo(Set<I> set){} class C implements I{} interface I {} So how we can use function foo with Set< C > para...
stackexchange/codereview
I have a team repo setup in our LAN, and it's group writable so everyone can freely push. (Note: the repo is purely for experimentation so I don't want any limit/check on push.) Now I want to use the notify extension to send email whenever a push happens. It works fine with my own push, but it does not work for others ...
stackexchange/codereview
I have some errors from Date and Long types and Overlay Types. Both uses long which is not allowed in GWT JSNI. Date serializes as long via getTime(). What I am doing right now (and it seems to work) is: FROM JAVA (Using Jackson to serialize to json) Long myLong = new Long(50) Date myDate = new Date(); public String g...
stackexchange/codereview
Comprehensions show unusual interactions with scoping. Is this the expected behavior? x = "original value" squares = [x**2 for x in range(5)] print(x) # Prints 4 in Python 2! At the risk of whining, this is a brutal source of errors. As I write new code, I just occasionally find very weird errors due to rebinding -- ...
stackexchange/codereview
I'm trying to figure out why the front page of my blog (http://www.ulblog.org) renders differently between Google Chrome and FireFox. It appears 'broken' in Google Chrome, but renders without issues in FireFox. Other pages on the site, however, appear to render fine in both (stack overflow apparently will only allow me...
stackexchange/codereview
Possible Duplicate: What is the best way to build XML in C# code? what's the best method to generate xml file?
stackexchange/codereview
I'm trying to push my app to heroku using: git push heroku master the process runs fine for a little while then spits out all kinds of errors that I've never seen before and I can't find much help on google. Here is the error log form console: XXXXX-MacBook-XXXXXX xxxx$ git push heroku master Counting objects: 7885, do...
stackexchange/codereview
I'm in the planning process of to build a iPhone app for a localRadio. I've read alot but i'm still confused on few things: The radio already got a mms stream, so it would be great if i just can read this stream and play it on the iPhone. searching for a library supporting mms i've stumbled upon libmms and i'm able to...
stackexchange/codereview
Suppose I have an asp:Repeater that I am using to display a list of names and phone numbers. <asp:Repeater runat="server"> <ItemTemplate> <p><%# Eval("name") %></p> <p><%# Eval("phoneNumber") %></p> </ItemTemplate> </asp:Repeater> Now, let's make it more fun. Let's suppose that there is one or more phone number...
stackexchange/codereview
I have written some VSTO (2003) code that sucessfully applies some mandatory subject line changes according to attachements of mail items. The code is written to operate on microsoft.office.interop.outlook.mailitem However, I need the same code to operate on other types such as microsoft.office.interop.outlook.appointm...
stackexchange/codereview
So, I have a string of 13 characters. string str = "HELLOWORLDZZZ"; and I need to store this as ASCII representation (hex) in a uint variable. How do I do this?
stackexchange/codereview
I'd like to add VSS support to an application I'm developing and the only good packaged method available seems to be AlphaVSS, though it hasn't been actively developed in almost two years. Are there other projects out there that I just can't find, or is there a more straightforward method to accessing the "API" (if you...
stackexchange/codereview
Possible Duplicate: Is Chrome's JavaScript console lazy about evaluating arrays? Open up Chrome Developer Tools and type in: var a = [];console.log(a);a.push(1);console.log(a); You would expect this to output something like [] [1] But instead it outputs [1] [1] The behaviour is the same for var a = [];console.log(...
stackexchange/codereview
I have a .NET app written VB.NET version 3.5 on a 32 bit machine. It manually creates a schema.ini file and uses the following code to connect to a .csv file. varConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ varFile.DirectoryName & "\;" & _ "Extended Properties=""Text;HDR=Yes;FMT=D...
stackexchange/codereview
I'm trying to set the selected value of a DropDownList which sits inside the Edit template of a FormView. Whenever I access it, I get error: Object reference doesn't exist I'm trying to set it in the following ways: DropDownList ddl = (DropDownList)FormView1.FindControl("ddlFrequency"); ddl.SelectedValue = "blah blah...
stackexchange/codereview
We have a drupal site and we wish to export data from this site in the form of several CSV files. I'm aware of the Views module addins that make this a very simple process on demand, but what we're looking for is a way to automate this process through cron. Most likely, we'll end up having to either write a standalone ...
stackexchange/codereview
After what seems like a very long time trying to find a solution, I thought it's about time to ask the experts. I have implemented jQuery tabs to my site, however as well as selecting a tab to show the content, I would also like to be able to show the different tabs content if you click on a standard html link elsewher...
stackexchange/codereview
I have created an application which build a grid or a matrix of elements dinamycally. When I try to navigate to another page I get an error: This is the code: private HtmlInputText createCelda(String vValue, String vStyle, String vTitle, String vId, boolean vscript, boolean isreadonly) { // private Application appl...
stackexchange/codereview
I have a script that I am developing that creates a sliding button type effect. Five div's are situated next to eachother each with a link. When one of those DIVS are clicked on the associated content is expanded and the rest of the Div's are closed. The problem is, if a user clicks the Div twice while it loads or clic...
stackexchange/codereview
I save some values from database using this function (i've been replaced Vector, because is deprecated) : // database function public ArrayList<String[]> selectQuery(String query) { ArrayList<String[]> v = null; String [] record; int colonne = 0; try { Statement stmt = db.createStatement(); ...
stackexchange/codereview
is there a possibility to get all images, or better image list from web (i would type it as variable) using shell script? Thanks
stackexchange/codereview
I have the following problem and I hope someone will be able to help me with it. I have a worker in VB .net (2010) which runs a shell-program. The shell program is a service and output stuff like: Server initializing... Server opening port... more info... I am able to 'catch' the output of the shell and add it to a te...
stackexchange/codereview
$(document).ready(function(){ $("form#fbox").submit(function(){ var msg = $("input#ibox").val(); $.get("foo.php", {m: msg}, function(data){ $('#display').html(data); }); return false; }); }); i have this jquery script wherein it creates a post request "invisibly" after submitting the form. thus not refres...
stackexchange/codereview
Hello i'm learning a bit JSP and i have a problem with the code below. I create one index.jsp file and try to run it with eclipse or directly with Tomcat 6.0. I always get a error for the line "if (name.equals("user") && password.equals("1234"))". The error is java.lang.NullPointerException. I would be glad for any ad...
stackexchange/codereview
When adding and removing series from a .net chart control (line chart), how can I retain the existing series colors? Currently, when I add several series to a chart, they all get colors assigned automatically from the chart palette. But if I then remove the first series, the colors of all of the subsequent series get ...
stackexchange/codereview
I've got a program which I'm maintaining, which was written by the guy I replaced at this company. There is an older version of the software which works fine on all of our deployment platforms, but the version I am trying to push out is working fine on 32-bit desktop installations, but is crashing-and-burning when it a...
stackexchange/codereview
I have this information from a Table: The due date day and month (eg. 16/11 for 16th November) of events that repeat every year. I need to create a View, sorted by how far it is in the future. (eg. If it is currently 16 Nov 2010, then 31/12 means 31 Dec 2010 and it comes before 1/1 which means 1 Jan 2011) Let's assume ...
stackexchange/codereview
I'd like to connect to WebDAV using PHP, and be able to upload files, etc. However, I cannot figure out how to connect to it. I imagine it would ultimately be as simple as opening a socket and sending the proper headers/commands, but I don't know what I'd need to send. I'd like to do this without extra libraries/classe...
stackexchange/codereview
How do access all of the children of a DisplayObject using code? (I'm looking for something like movieclip.children) I'm using this in two cases: 1) To loop through and reposition all of the children of an enclosing MovieClip. Or 2) To loop through and delete all of the children of a MovieClip Also, this is a Flash CS5...
stackexchange/codereview
I have apex tag that generate input text field. <apex:page id="my_page"> <apex:inputText id="foo" id="c_txt"></apex:inputText> </apex:page> When someone clicks this field, I want to execute javascript. But when I check the HTML source, this apex tag which becomes input tag has (I think) dynamically generated part....
stackexchange/codereview
Hopefully this is an easy one - though I don't seem to have much luck Googling the following: Usually in an ASP.NET Web Application I would write - My.Application.Info.ProductName or My.Application.Info.Version, but I'm looking at an older ASP.NET Web Site and it doesn't have the Application option. Does anyone know t...
stackexchange/codereview
I have a JTabbedPane and a JTextArea, I want the Textareas/Panes to resize to fit the window when the window is resized. How do I do this? I'm also fuzzy on if it's the right text component to use. Really Muddled. EDIT: I was setting explicit size as a dumb dumb. I've got it all worked out. What I did is set the viewp...
stackexchange/codereview
After getting tired of the default cygwin terminal, I decide to try rxvt. Everything seems fine except one thing: the color schemes for my git repositories stop working. BTW other color schemes like the vim editor works fine under rxvt. I also ran this script to ensure that 256 colors are enabled. My ~/.gitconfig looks...
stackexchange/codereview
From Eclipse, I found I can easily export an Ant build file for my project. It provides references to 3rd party libraries and some base targets. I'm using it from my global build file. The only thing that bothers me about this, is that if something is modified in the project structure (like adding a new 3rd party libra...
stackexchange/codereview
I'm trying to encapsulate the WebClient async download method so I can get an progress bar update while waiting for lengthy files to download. MSDN documentation indicates that FTPDownloadCompleted and FTPDownloadProgressChanged are on a different thread but they never fire. Maybe I'm going about this the wrong way, bu...
stackexchange/codereview
I'm adding tool tips using the qtip jquery plugin. I may add 50-60 tool tips over an entire site. The way I've found to do it right now is ti cut/paste the jquery code over and over. For example: // First, setup a tool tip for 'Enter Username'. $("input#user_login").qtip({ content: 'Enter username', position: { ...
stackexchange/codereview
I have a poll with the following action echo("\t<form class=\"vote\" method=\"post\" action=\"" . $url . "vote.php\">\r\n"); vote.php calls several validating functions and finally displays the poll results What I want is when the submit button is pressed, using jQuery, call vote.php and display the vote result replac...
stackexchange/codereview
I have a project which consists of GWT client end and a Tomcat server end. Everything is setup using maven. However, I want the client's HTML and CSS files (which reside in the resources folder) to be copied to the server projects webapp directory. I have been looking at the maven-dependency-plugin but cannot get it to...
stackexchange/codereview
I am wanting to show the time elapsed since the time posted for a blog or similiar, I am using php and I am storing the time posted as a unix timestamp but I cannot for the live of me work out how to show the time since it was posted using the stored timestamp.
stackexchange/codereview
I have a little snag , I ought to Convert my Stopwatch into Int , Stopwatch czasAlg = new Stopwatch(); czasAlg.Start(); //Do something czasAlg.Stop(); Int32 mojCzas = Convert.ToInt32(czasAlg); //I try to convert but it does't work. // Int32 mojCzas = Convert.ToInt32(czasAlg.ToString()); //It does't work too. Any Idea...
stackexchange/codereview
I have to pin my organization branch location on the map so that I need a map. But my server don't have an Internet connection to get the map from Google or Bing. How can I do this?
stackexchange/codereview
I want a stop watch with a start button and a stop button in my asp.net 2.0 page. How to implement this? I would also like a timer to calculate how much time user is viewing the page so that I can add this time in my database.
stackexchange/codereview
When I use for loop, which calls UIATarget.localTarget().frontMostApp().mainWindow().elements(); to search a specific element on the Main View, it runs really slow. Has anyone experienced this problem yet? If so, any sug
stackexchange/codereview
Is there any sample technical architecture diagram for an iPhone app which could depicts high level components and their interactions. Please guide.
stackexchange/codereview
i need to set the value/values of a form select field in an iframe using jquery. how can this be done?
stackexchange/codereview
Is there any way to write a custom class which extends .NET Attribute class so that I can apply that class on a method and .NET Framework calls my class constructor before executing that method. Here is the example public class TestAttribute : Attribute { public TestAttribute() { Console.WriteLine("Call...
stackexchange/codereview
I'm testing a django app not written by myself, which uses two fixtures: initial_data.json and testing.json. Both fixtures files contain conflicting data (throwing an integrity error). For testing, I've specified TestCase.fixtures = ['testing.json'], but initial_data.json is loaded too. How can I avoid loading initial...
stackexchange/codereview
I'm working on an ASP.Net webpage which will use the jQuery Dropdown Checklist (http://code.google.com/p/dropdown-check-list/). I'm fairly inexperienced with JavaScript and completely new to jQuery. Basically, my question is: How do you update the selected items in a jQuery DropdownChecklist from the server-side? NOT...
stackexchange/codereview
Attempting to learn CI and going through the docs to get a better understanding. Without getting a separate library, I could make a template by including a list of views like so: $this->load->view('header'); $this->load->view('navigation'); $this->load->view('sidenav_open'); $this->load->view('blocks/userinfo'); $this-...
stackexchange/codereview
A good example of this is either on the Twitter launch screen (the screen with the large icons that is seen when the application is first launch) or even just look at the application tray when you focus an application icon. Basically I need to highlight an ImageView where the highlight contours to the image within the ...
stackexchange/codereview
I have markers in two marker layers,which i need to keep separate, so I can clear one or the other in the application. What is the best way to make sure all markers are displayed. Doing it for one layer is easy with zoomToExtent. But how to do it for more then one layer?
stackexchange/codereview
I need to change the colors and/or style of the ContextMenu when I long press an item of a ListView. I've looked everywhere for an answer and cannot find anything related to ContextMenu customization. Is it possible? Thanks!
stackexchange/codereview
UITableViewCell of type UITableViewCellStyleValue1 is what is used in the Settings of the iPhone/iPad. I would like to know how to make a UITableViewCell that allows you to edit in-place a secure string (showing dots instead of actual text) in the detailTextLabel similar to the setting of the password field in creatio...
stackexchange/codereview
Is there any way in Java to find the class an object is part of? class WrapperClass { SomeObject o; ... someMethodOfWrapperClass() { ... } } [...] SomeObject foo = new SomeObject(); WrapperClass wrap = new WrapperClass(); wrap.o = foo; Is there any way to find the corresponding WrapperClass object wr...
stackexchange/codereview
I'm having a problem where i have a page that does not have a doctype. I can't access it on the server so i can't add a doctype declaration myself. This causes browsers to render in quirks mode and almost all designs need separate stylesheets for different explorer versions. Some difficult layouts don't even work on ...
stackexchange/codereview
Below is a very simple example, randomly, if I click the step2 button the state will change but the Step 2 panel will not be there. I suspect the children of the state are not getting created for some reason, which is why I set the itemCreationPolicy to "immediate", but it makes no difference This is catastrophic for t...
stackexchange/codereview
I've been trying to get PHPExcel to work with my Joomla. If the script saves it into file, it works fine but when I'm trying to output it to the browser for download, the file will give a warning 'File extension or file format is not valid'. My guess would be something to do with the Content-Type being served. Any idea...
stackexchange/codereview
i have the following class structure mapped to my database, note in my diagram b is a one to many child of A, etc. a -b --c -d --e ---f ---g now, when i get my result set back from hibernate, i plug it into jibx to be marshalled and sent to the client. my problem is when jibx tries to access the lazy load records, i ...
stackexchange/codereview
I want to bind data from an xml file? how can I do that where i'm using a layout xml file to define a scrollview ??
stackexchange/codereview
I have an Android code base which uses APIs with settings to get different data for several apps. All apps use the same code base but with one or two design tweaks. So how do I re-use the main code base without having to copy the whole Android project each time? iPhone uses multiple targets in the same project which wo...
stackexchange/codereview
Does autofac provide me with a way to get all "active" instances of a component? So that the following works: public class ViewManager { public ViewManager(Func<IEnumerable<MyView>> viewProvider, Func<string, MyView> viewFactory) { ViewProvider = viewProvider; ViewFactory = viewFactory; } ...
stackexchange/codereview
I'm using MacFUSE to create a cool filesystem. I'd like to set the NSFileOwnerAccountID and NSFileGroupOwnerAccountID attributes for the files on it, but the underlying framework I use only gives me user names. How can I get an account ID from an account name under Mac OS X using Cocoa or other built-in frameworks?
stackexchange/codereview
I have a little web app, which uses a lot of ajax. After someone logs in, what we need to keep persistent is their user_id and group_id The way I first did authentication, I just stored these as clear txt in cookies ( $_COOKIE['user_id'], $_COOKIE['group_id'] ). Obviously that was bad since you could modify both values...
stackexchange/codereview
I am looking for a way to code a link to open an instant messaging program. I have found the ways to open aim and yahoo chat, but not Jabber. Any ideas? AIM: <a href='aim:goim?screenname=foo'>foo</a> Yahoo Chat: <a href='ymsgr:chat?foo'>foo</a>
stackexchange/codereview
Is it possible for Hibernate to be configured to generate static SQL? Is there a Hibernate configuration/set-up parameter that forces Hibernate to generate static SQL as opposed to dynamic? Can not find this in any manuals I have looked at. I am working with Hibernate in a DB2 environment and trying to find ways of im...
stackexchange/codereview
Lets assume the simple case, a simple relationship between table A and table B, where B has an A_Id field in it. Now, assume I have an object of type A (currentA), and am creating a brand new B object. B newB = new B() { A_id = currentA.Id }; Is this the correct way to set that relationship? Or should I do: B newB = ...
stackexchange/codereview
I'm currently working on a ZK screen with a Listbox that contains groups. Since you can't (as far as I know) use DataBinder to set the model with a GroupsModel, I'm manually creating one and calling setModel. To configure the Listgroups and Listitems I need to create a ListitemRenderer, which I've done. The problem i...
stackexchange/codereview