Hello,
Do you know some good Open Source project written in PHP that is a finest example of MVC and is just the best example to learn how to write a state of art project?
kind regards,
I have an application where the taskbar flashes if an event has occurred. This is working perfectly, and was relatively easy to implement using a Win32 API described below:
http://blogs.x2line.com/al/archive/2008/04/19/3392.aspx
However, when I stop the flashing, sometimes the application is stuck in the "highlighted" state in the taskbar. This only gets reset by clicking on the application in the taskbar, minimizing it, then re-maximizing it. Is there a way to clear this from being highlighted without any user interaction?
CREATE TABLE SupplierQuote
(
supplierQuoteID int identity (3504,2) CONSTRAINT supquoteid_pk PRIMARY KEY,
PONumber int identity (9553,20) NOT NULL
.
.
.
CONSTRAINT ponumber_uq UNIQUE(PONumber)
);
The above ddl produces an error:
Msg 2744, Level 16, State 2, Line 1
Multiple identity columns specified
for table 'SupplierQuote'. Only one
identity column per table is allowed.
How can i solve it? I want PONumber to be auto-incremented.
I'm trying to drop a constraint on a db table, something like:
ALTER TABLE MyTable drop CONSTRAINT FK_MyTable_AnotherTable
But the execution just runs and runs. If I stop it I see:
Msg 3727, Level 16, State 0, Line 2
Could not drop constraint. See previous errors.
Web search throws up various pages but note that the constraint is properly named and I am trying to remove it using the correct name
update p
set
p.storePrice =
CASE
WHEN
p.costPrice BETWEEN 0.00 AND 1.00
THEN p.costPrice * 1.0
CASE
WHEN
p.costPrice BETWEEN 0.00 AND 1.00
THEN p.costPrice * 1.0
ELSE
p.msrpPrice
END
FROM product p
WHERE p.type = 1
The error says:
Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'CASE'.
I can't seem to see any issue with the sql?
My code:
MEMORY_BASIC_INFORMATION meminf;
::VirtualQuery(box.pBits, &meminf, sizeof(meminf));
The results:
meminf:
BaseAddress 0x40001000 void *
AllocationBase 0x00000000 void *
AllocationProtect 0x00000000 unsigned long
RegionSize 0x0de0f000 unsigned long
State 0x00010000 unsigned long
Protect 0x00000001 unsigned long
Type 0x00000000 unsigned long
Notes:
(1) AllocationBase is NULL while BaseAddress is not NULL
(2) AllocationProtect is 0 (not a protection value)
Is it a bug of VirtualQuery?
I have a page that performs an Ajax request that replaces a div every second.
This div also has hyperlinks in it.
If the user tries to click one of the hyperlinks, it will work, but if they move the cursor over the link, wait for a second without moving the cursor, the hyperlink no longer has the "hover" pseudostyle and if they click at the wrong time, the link doesn't work.
Is there a way to update the div without causing this, or to restore the "mouse over" state of the link?
If I define the up and over states of a button like this:
.button {color:red;}
.button:hover {color:blue;}
How can I get all the hover state styles for an element using JQuery?
Something like $(".button:hover").styles...
I refered this link.I am using the uri for streetview:
Uri.parse("google.streetview:cbll=" + sv_lat_val + ","+ sv_long_val + "&cbp=1,45,,45,0.0&mz=0.0")
But the zoom level always in Zoomed state. 1.0 is the normal zoom. so i set it for 0.0 . still its not zoomed out. why? But it working in default Google maps App? Any idea?
I am using the following to mute/unmute the master audio on my computer. Now, I am looking for a way to determine the mute state. Is there a just as easy way to do this in C#?
private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int WM_APPCOMMAND = 0x319;
[DllImport("user32.dll")]
public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
And how do I convert it to a datetime.datetime instance in python?
It's the output from the New York State Senate's API: http://open.nysenate.gov/legislation/.
I need to preserve the current GlBlendFunc so can restore it after I do some work. It seems that this is not one of the attributes that can be saved with GLPushAttrib, is there some other similar method I can use to preserve the state?
I am working on a custom Camera activity for my application.
I was following the instruction from the Android Developers site here:
http://developer.android.com/guide/topics/media/camera.html
Everything seems to works fine, except the Callback function is not called and the picture is not saved. Here is my code:
public class CameraActivity extends Activity {
private Camera mCamera;
private CameraPreview mPreview;
private static final String TAG = "CameraActivity";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.camera);
// Create an instance of Camera
mCamera = getCameraInstance();
// Create our Preview view and set it as the content of our activity.
mPreview = new CameraPreview(this, mCamera);
FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview);
preview.addView(mPreview);
Button captureButton = (Button) findViewById(R.id.button_capture);
captureButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.v(TAG, "will now take picture");
mCamera.takePicture(null, null, mPicture);
Log.v(TAG, "will now release camera");
mCamera.release();
Log.v(TAG, "will now call finish()");
finish();
}
});
}
private PictureCallback mPicture = new PictureCallback() {
@Override
public void onPictureTaken(byte[] data, Camera camera) {
Log.v(TAG, "Getting output media file");
File pictureFile = getOutputMediaFile();
if (pictureFile == null) {
Log.v(TAG, "Error creating output file");
return;
}
try {
FileOutputStream fos = new FileOutputStream(pictureFile);
fos.write(data);
fos.close();
} catch (FileNotFoundException e) {
Log.v(TAG, e.getMessage());
} catch (IOException e) {
Log.v(TAG, e.getMessage());
}
}
};
private static File getOutputMediaFile() {
String state = Environment.getExternalStorageState();
if (!state.equals(Environment.MEDIA_MOUNTED)) {
return null;
}
else {
File folder_gui = new File(Environment.getExternalStorageDirectory() + File.separator + "GUI");
if (!folder_gui.exists()) {
Log.v(TAG, "Creating folder: " + folder_gui.getAbsolutePath());
folder_gui.mkdirs();
}
File outFile = new File(folder_gui, "temp.jpg");
Log.v(TAG, "Returnng file: " + outFile.getAbsolutePath());
return outFile;
}
}
After clicking the Button, I get logs: "will now take picture", "will now release camera" and "will now call finish". The activity finishes succesfully, but the Callback function was not called during the
mCamera.takePicture(null, null, mPicture);
function (There were no logs from the mPicture callback or getMediaOutputFile functions) and there is no file in the location that was specified.
Any ideas? :)
Much thanks!
select @[email protected]('*')
for xml raw,type
Above statement will generate following alert:
Msg 6819, Level 16, State 3, Line 2
The FOR XML clause is not allowed in a ASSIGNMENT statement.
SELECT
*
FROM
company c
INNER JOIN
city ci ON ci.city_id = c.city_id
INNER JOIN
state s ON s.state_id = c.state_id
WHERE
MATCH (
c.name, ci.name, c.zipcode, s.name
)
AGAINST (
'los angeles'
)
I am currently working on a senior project on software engineering and implementing a defect prediction mechanism in software projects which use version control system.
Therefore, i want to ask the community about their commit message procedures.
Which words in the commit messages may infer "bug fixed" meaning? So that, i can understand that the modified files in that revision was in a buggy state?
Given that state information is implicit in the zip code aren't storing both of them some violaiton of third normal form? Can or should you simply combine them into one field?
Hey, I have a table like this
Name State Amount
------------------------------
Pump 1 Present 339
Pump 1 Optimized 88
Which I want to transpose something like this
Pump 1 Present 339 Optimized 88
How can I do this with MS SQL 2000? I tried to search for a solution, but couldn't find the most fitting solution :(
I try open process window, this code work if window state is minimize, but if program in system tray window isn't opened.
[DllImport("User32")]
private static extern int SetForegroundWindow(IntPtr hwnd);
[DllImport("User32")]
private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private static void ShowWindow(Process process)
{
ShowWindow(process.MainWindowHandle, SW_RESTORE);
SetForegroundWindow(process.MainWindowHandle);
}
I am using a namespace called ComShorCaliburnWPF.ViewModules.Views.ShortMenuWindows.GWDSCT on my View.xaml and View.cs, for my ViewModel.cs and my IoC container I am using ComShorCaliburnWPF.ViewModules.Views.ShortMenuWindows.GWDSCT. When I remove the GWDSCT at the end it works fine, but in its current state it does not. I would like it to work how it is now because it accurately reflects where the files are located. Any suggestions?
I have a button containing 2 child buttons. I want to be able to keep the mouse over state active, when I rollover a child button. At present it fires mouse out when i rollover a child button, I suspect this is correct, but not what I want to happen.
Any ideas how to get around this?
I am giving a small presentation to a group of Java developers and looking for some core areas to target. Ideally I would like to only talk about the core concepts in ASP.NET.
I am coming up with
Authentication
Session State
ASP.NET MVC
LINQ (more .net)
Any more that I should be considering?
Hi,
To enable a go back function with an ajax div i have create these simple functions and i was wondering how much data a .js global variable can hold??
var dataAfterSearch; //global variable which holds our search results
function goBackAfterSearch() {
/**
* function which displays the previous state
*
**/
$.ajaxSetup ({
cache: false
});
//alert("Previous Search" +dataAfterSearch);
$('#result').html(dataAfterSearch);
paginateIt();
}
function setDataAfterSearch(data)
{
/**
* function to set the global dataAfterSearch
*
**/
dataAfterSearch = data;
}
kind regards