Lets say I have the following:
data Greek = Alpha | Beta | Gamma | Phi deriving Show
I want to use the default showing of all items except Beta, which I want to say "two".
Can I do this?
A legacy database contains a join table which links tables table1 and table2, and contains just two foreign keys:
TABLE_ORIG:
table1_id
table2_id
In order to utilize this table using JPA I would need to create a surrogate primary key to the link table. However, the existing table must not be modified at all.
I would like to create another table which would contain also a primary key in addition to the foreign keys:
TABLE_NEW:
id
table1_id
table2_id
All changes to TABLE_ORIG should be reflected in TABLE_NEW, and vice versa.
Is this doable in mysql?
Hello! I am working on a MUD client written in Clojure. Right now, I need two different threads. One which receives input from the user and sends it out to the MUD (via a simple Socket), and one that reads and displays output from the MUD, to the user.
Should I just use Java Threads, or is there some Clojure-specific feature I should be turning to?
I using svn. I have two branches and on both of them were performed a lot of changes.
In addition of one of the branches a lot of files were renamed, so now svn can not help me merge changes in those files (well know svn limitation).
Is it possible using git-svn to perform the merge of the branches?
Will git-svn hanndle renamed files too?
Thanks
Wordpress ships with the wpdb class which handles CRUD operations. The two methods of this class that I'm interested in are the insert() (the C in CRUD) and update() (the U in CRUD).
A problem arises when I want to insert a NULL into a mysql database column - the wpdb class escapes PHP null variables to empty strings. How can I tell Wordpress to use an actual MySQL NULL instead of a MySQL string?
Hello.
I am trying to merge two files. One of them is .net3.5 wpf application and other is WPF notify icon dll
i use the following command:
IlMerge /target:winexe /out:PS.exe "PlayerSearcher.exe" "Hardcodet.Wpf.TaskbarNotification.dll"
But when i launch result assebmly my application is crashed with this error
EventType : clr20r3 P1 : ps.exe
P2 : 1.0.0.0 P3 : 4c0ee52f P4
: presentationframework P5 :
3.0.0.0 P6 : 4938d608 P7 : 9a1 P8 : 46 P9 : system.io.ioexception
Why? And how i can to build a single file application?
Hi guys,
I'm just wondering what consequences the method
isRouteDisplayed()
has, regarding to functionality of a map view...
I have two activities, one displays a route and one doesn't. Is it mandatory to let the first isRouteDisplayed()-Method return true? What effects does it have?
greets, poeschlorn
Is there a way to estimate the offset from GMT (or time zone) from a latitude/longitude? I've seen geonames, but this would need to work long term and we don't really want to rely on a web service. It'd just be used for determining whether to display "today" or "tonight" when giving information to various users so it wouldn't need to be too accurate (an hour or two off wouldn't be bad).
I believe it was Eric Sink said that "C# is Java done right". I am pretty familiar with Java, and thought I could try to learn some C#.
As I understand it, these two OO-languages are very similar, so what are the actual differences (if any)?
I tried to build an index over a two columns of a 30,000,000 entry database.
I canceled the process after ~60hr as it didn't seem to work.
For some reason MySQL takes only 22 mb ram instead of using the RAM fully.
Is index building an operation that needs no Ram or is there some way to tell MySQL to use more RAM to be faster?
I'm after a book to read whilst on holiday.
Some criteria:
The book has to be relatively short. < 500 pages.
I'd prefer a book that changes your thinking, rather than reams of syntax to look at.
So the last two years here have been my books:
Last year, The Craftsman by Richard Sennet (Changed how I viewed career development, quality)
Year before, Zen and The art of motorcycle maintenance (Makes you think about quality, maintenance)
Is it possible to override Tomcat's embedded generator of JSESSIONID, to be able to create custom values of this cookie, based on user's login?
Why do I need this: I have a load balancer with "sticky sessions", configured to route requests with the same JSESSIONID to the same server, and I want to prevent situation, when same user can start two different sessions on different servers.
I noticed that there are at least two kinds of crashes in Windows Mobile
Silent Crash
The application crash but there is no "send report" dialog prompted by the OS
Crash with "send report"
The application crash and there is a "send report" dialog prompted by the OS
When does each of them happen and perhaps what are some common scenarios/reasons they happen?
I can see how a cipher can be developed using substitutions and keys, and how those two things can become more and more complex, thus offering some protection from decryption through brute-force approaches. But specifically I'm wondering:
what other major concepts beyond substitution and key are involved?
is the protection/secrecy of the key a greater vulnerability than the strength of the encryption?
why does encryption still hold up when the key is 'public' ?
are performance considerations a major obstacle to the development of more secure encryption?
SELECT name FROM sys.databases -- this can list all database name in the server
user database
SELECT * FROM INFORMATION_SCHEMA.TABLES -- these two line can list the table for one particular database
but how to do something in order can have the result like the following
Database Table
--------- -------------
db1 t1
db1 t2
db2 t1
... ...
-thx
Does it mean that the Loopback device handles the request like ping localhost ?
If so, there should be at least one device that's loopback,but seems none of my two network device is Loopback:
rpcap://\Device\NPF_{45D5ADA0-095E-49F3-BEA1-E8754390F2D4}
Description: Network adapter 'Intel(R) PRO/Wireless 2200BG Network Conne
ction (Microsoft's Packet Scheduler) ' on local host
Loopback: no
rpcap://\Device\NPF_{783C5467-4026-473C-86A0-5E5A3708C624}
Description: Network adapter 'Realtek RTL8169/8110 Family Gigabit Ethern
et NIC (Microsoft's Packet Scheduler) ' on local
host
Loopback: no
Can someone clarify all this?
Hi,
I have to use a Virtual(on screen) keyboard on a asp:textbox which has a AjaxControlToolkit's
automcomplete attached to it, the virtual keyboard I use is the jQuery keypad plug in: http://keith-wood.name/keypadRef.html , but I have some problems with combining these two:
Typing in the virtual keyboard does not
trigger the Autocomplete list.
When the textbox has
autopostback=true if you click
anything on virtual keyboard the
textbox loses its focus and posts
the form.
Hi, I have a website ( based on JSP/Servlets ,using MVC pattern), and I want to support AJAX-based website and basic HTML-based website. website visitors should be able to change the surfing mode from Ajax to basic HTML and vise versa, - as it applies in Google-mail.
The Questions :
What is the best way to achieve this goal easily?
Should I design two views for each page?
I use JQuery and JSON as the result of this answer.
Is it possible to simulate the actions of a mouse from a program in OS X? Specifically, the short version is that I'm trying to simulate a touchscreen using two webcams. So assuming I can get X,Y positions, can I send information to the OS as a mouse movement or click?
I'm working on a team with lots of people who are pretty unfamiliar with the concepts of version control systems, and are just kind of doing whatever seems to work, by trial and error. Someone created a "branch" from the trunk that is not ancestrally related to the trunk. My guess is it went something like this:
They created a folder in branches.
They checked out all the code from the trunk to somewhere on their desktop.
They added all that code to the newly created folder as though it was a bunch of brand new files.
So the repository isn't aware that all that code is actually just a copy of the trunk. When I look at the history of that branch in TortoiseSVN, and uncheck the "Stop on copy/rename" box, there is no revision that has the trunk (or any other path) under the "Copy from path" column.
Then they made lots of changes on their "branch". Meanwhile, others were making lots of changes on the trunk. We tried to do a merge and of course it doesn't work. Because, the trunk and the fake branch are not ancestrally related.
I can see only two ways to resolve this:
Go through the logs on the "branch", look at every change that was made, and manually apply each change to the trunk.
Go through the logs on the trunk, look at every change that was made between revision 540 (when the "branch" was created) and HEAD, and manually apply each change to the "branch".
This involves 7 revisions one way or 11 revisions the other way, so neither one is really that terrible. But is there any way to cause the repository to "realize" that the branch really IS ancestrally related even though it was created incorrectly, so that we can take advantage of the built-in merging functionality in Eclipse/TortoiseSVN?
(You may be wondering: Why did your company hire these people and allow them to access the SVN repository without making sure they knew how to use it properly first?! We didn't -- this is a school assignment, which is a collaboration between two different classes -- the ones in the lower class were given a very quick hand-wavey "overview" of SVN which didn't really teach them anything. I've asked everyone in the group to please PLEASE read the svn book, and I'll make sure we (the slightly more experienced half of the team) keep a close eye on the repository to ensure this doesn't happen again.)
Yes, There's More Than One Way To Do It™, but what is the most canonical, most efficient, and most concise methods to read an entire file into a string? (The latter two are perhaps at odds.)
Given the following pseudo-code:
Company
has_many :jobs
Job
belongs_to :company
I'm creating a form to post a new job. In the form, I want to have two fields for an optional company. On submission, if a company was entered, I want to either create or update the company and associate it with the new job. I know if the company exists by searching the companies table for the company's url.
Is it possible to do this using form_for, fields_for, and accepts_nested_attributes_for
given the company may not exist?
Hello,
i want to bind two exe files into one exe file, and when executed it should only create 1 process.
For example you can try to bind windows calc.exe and notepad.exe to binded.exe and when executed it should just see binded.exe in process list and both calc.exe and notepad.exe should start.
Hi,
I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part...
I'm doing this with greasemonkey and jQuery...
I'm trying something like this
$("input[@type=text]").setValue("[email protected]");
but had no success...
The Page has only the login part, two text type inputs...
What am I missing here?