how to give delays for a asynchronous callbacks, is there any way to pause,or resume(current process for a certain time),or any availability of sleep mode
Why when I'm debugging in debug mode everything in code below works as suppose to but when I switch to release I'm getting strange result?
void say_hello(int argc, char* argv[])//In release mode argc has different values from 124353625 to 36369852
<include iostream>
{
std::cout << "In say_hello()\n";
}
int main(int argc, char* argv[])
{
say_hello(3,argv);//when instead of literal I enter "argc" everything is ok.
return 0;
}
Thanks for help.
I was surprised that the Latex code from a recent question didn't throw up any errors, and even more surprised on further investigation, that Crowley's explanation seems to be true. My intuition about the \begin{equation} ... \end{equation} code is clearly off, what's really going on?
Consider this, slightly adapted code:
\begin{equation}
1: e^{i\pi}+1=0
$$ 2: B\"ob $$
3: e=mc^2 \end{equation}
This seems to prove that Crowley's explanation of such code, namely that "What that code says to LaTeX is begin equation, end it, begin it again, typeset definition of tangens and end the equation" is right: lines 1&3 can only be typeset in maths mode, line 2 only in text mode.
Shouldn't Latex see that the \end{equation} is ending a display math that wasn't started by the \begin{equation}?
Hi, so I want to do something like when you press on LogOut, you get a waiting message like "please wait.." while its running ucp.php?mode=logout in the background, and after it has loaded that it should refresh the site.
How should this be done??
I am new to jquery, but so far i gave my link a ID, called #logout, made a <div id="message"></div> and then in jquery i did:
jQuery(document).ready(function(){
$('#tryout').click(function () {
logOut();
});
function logOut() {
var postFile = 'ucp.php?mode=logout';
$.post(postFile, function(data){
$("#message").fadeIn('slow');
});
}
Now is this right? And the line with #message, where it fades in, i don't really think its right because where's should i write the "Please wait" and the refresh part?
Please help me
Andrew, M facing the same problem.IIS Management console is not present under web management tool.Two options are there
1IIS 6 management compatibility 2IIS Management Scripts & Tools.
checked both. But come in no use.Please help.
[email protected]
Do you know how if you drag an <mx:Label> or <s:Label> component into your Flex project, when you go to design mode you get this panel on the right to set its properties like text etc.
I have a custom component that I can call with actionscript, or with mxml like this:
<comps:TheComp field1="OK" field2="Yes" />
The component takes this input and uses it for its internal operation
private var field1:String;
private var field2:String;
private function initializeit()
{
// component takes the input and lays it out as needed
}
When I go to design mode, I can see the component under custom components, I can drag it to the stage and see it, but can't set its values field1 and field visually on the right like a normal <s:Label> or <mx:Label> would have.
Any idea how I can add that? Do I need to make it inherit something or anything else
I am trying to bind to a static property on a static class,
this property contains settings that are deserialized from a file.
It never works with the following XAML :
<Window.Resources>
<ObjectDataProvider x:Key="wrapper" ObjectType="{x:Type Application:Wrapper}"/>
</Window.Resources>
<ScrollViewer x:Name="scrollViewer" ScrollViewer.VerticalScrollBarVisibility="Auto"DataContext="{Binding Source={StaticResource wrapper}, UpdateSourceTrigger=PropertyChanged}">
<ComboBox x:Name="comboboxThemes"
SelectedIndex="0"
SelectionChanged="ComboBoxThemesSelectionChanged"
Grid.Column="1"
Grid.Row="8"
Margin="4,3" ItemsSource="{Binding Settings.Themes, Mode=OneWay}" SelectedValue="{Binding Settings.LastTheme, Mode=TwoWay}" />
It does work by code however :
comboboxThemes.ItemsSource = Settings.Themes;
Any idea ?
Thank you :-)
Would it be considered best practice to use a single template that changes it's output based on script values, or have multiple templates, and use the view to pick the correct one instead?
For example, in this underscope template:
<script type="text/template" id="SkillsetTemplate">
<div class='RegularMode <%= (skillset.get('InEditMode')===false)?'show':'hide' %>'>
</div>
<div class='EditMode <%= (skillset.get('InEditMode')===true)?'show':'hide' %>'>
</div>
</script>
I use a backbone model to bind against, and use the InEditMode attribute to pick which content to render.
Should I instead have a normal mode, and an edit mode template, and use the attribute on the model to pick the template ?
For background purposes, I am using backbone.js with underscore templates and an MVC3 backend.
We noticed that on W7 with DPI set to 125% or to 100% with ("Use windows xp style dpi scaling") turned off, our fullscreen mode (which sets the client rect of our window = desktop rect of the main monitor) no longer hides the task bar like it does for other settings.
(The setting can be found in the Control Panel\Appearance and Personalization\Display section after clicking on the "Set custom text size (DPI)" link)
I found the following interesting article:
http://www.mathies.com/weblog/?p=908
So I set out to try to work around the bug in other means than manually hiding/restoring the taskbar visibility but so far I've failed and currently believe it's a bug in W7 (and possibly vista).
The following applications also fail to work properly in fullscreen mode (the taskbar is still visible):
* Microsoft Visual Studio 2008
* Microsoft Word 2007
* Adobe Reader 9.1.3
These apps work (probably by hiding the task bar through the WIN32 API):
* Powerpoint Slide Show
I also tried creating a brand new MFC-based app and use its "SetFullScreenMode()" functionality but it fails in the same way as all other apps on the list.
Does anyone know of a workaround?
Thanks,
Per
this is the query command echo from php web page:
SELECT DISTINCT FT.file_type_name AS type,FT.file_type_en AS tp,FT.file_type_id AS fti, MATCH(keywords) AGAINST ('words <2' IN BOOLEAN MODE ) AS score FROM movie AS M,file_type AS FT WHERE MATCH (keywords) AGAINST ('words <2' IN BOOLEAN MODE ) AND M.type_cn = FT.file_type_id HAVING score >=1 ORDER BY FT.file_type_order;
I am running above query in MySQL tools HeidiSQL and got only tow row records which score are 1.66666 and 2. If I remove the HAVING clause I would got three row records with one's score less than 1.
But the same query I get from PHP mysqli_query() were all the three records and the one which score less than 1 became 1.
What is the problem. Any tips will be pleasure.
Thank you very much!!
Hi there. My application is quite simple, but I have some problems when it starts. I setted in the Info.plist to be landscaped, but it seems to ignore the order. In fact, when the app is loading the Simulator is landscaped, but then it returns in portrait mode.
This is the hierarchy of the views and controllers:
MainViewController (extends UITabBarController just to override shouldAutorotateToInterfaceOrientation:)
Three extended UITableViewControllers as tabs (also those have the shouldAutorotateToInterfaceOrientation correctly setted up).
If I kinda force the orientation of the device to Landscape with:
[[UIDevice currentDevice] setOrientation: UIInterfaceOrientationLandscapeRight];
Then for an instant the Simulator flashes in portrait mode, and then it goes landscaped. The problem is that in this way, the auto-rotation animations gets started, which is something I cannot tollerate. I just want a fixed, landscaped application.
Any clues? Am I missing something?
I'm researching a way to provide a somewhat custom toolbox, widget or switchboard which will reside on users desktop visible at most times for easy access to resources. Resources could be websites, local computer applications, custom api, etc.
Compatibility should be Windows XP, 2008 Server, 7, Vista.
Unsure if I should custom build an application with Visual Studio, Customize a Open Source Package or what could be a good simple implementation.
Any advice or comments on this will be greatly appreciated.
I want to add a WHERE clause to a full text search query (to limit to past 24 hours), but wherever I insert it I get Low Level Error. Is it possible to add the clause and if so, how?
$query = "SELECT * WHERE story_time > time()-86400 AND MATCH (story_title) AGAINST ('".validate_input($_GET['q'])."' IN BOOLEAN MODE) AS Relevance FROM ".$config['db']['pre']."stories WHERE MATCH (story_title) AGAINST ('+".validate_input($_GET['q'])."' IN BOOLEAN MODE) HAVING Relevance > 0.2 ORDER BY Relevance DESC, story_time DESC LIMIT ".validate_input(($_GET['page']-1)*10).",10";
Hi all,
In the MSDN is writen about TreeNode that:
"By default, a node is in selection mode."
"To put a node into selection mode, set the node's NavigateUrl property to an empty string."
"When a node is in selection mode, use the SelectAction property to specify which event or events are raised when a node is selected."
"Setting TreeNodeSelectAction value TreeNodeSelectAction.Select Raises the SelectedNodeChanged event when a node is selected."
Please see TreeNode
Here is the problem and possibly a bug in the control:
When I set the TreeNode object PopulateOnDemand value to true and call the Collapse() function on that node.
Then the TreeNodeExpanded event is raised in addition to the SelectedNodeChanged event.
This is in complate contradiction to what is writen in the MSDN.
According to the MSDN this sould happen only if TreeNodeSelectAction Property is set to
TreeNodeSelectAction.SelectExpand value.
Does some know whats the cause for that?
Here is the code:
<asp:TreeView ID="TreeView1" runat="server" AutoGenerateDataBindings="False"
onselectednodechanged="TreeView1_SelectedNodeChanged"
ontreenodepopulate="TreeView1_TreeNodePopulate">
</asp:TreeView>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string path = Server.MapPath(".");
PopulateTopNodes(path);
}
}
//MSDN : Occurs when a node with its PopulateOnDemand property set to true is expanded in //the TreeView control.
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
LoadChildNode(e.Node);
}
private void PopulateTopNodes(string pathToRootFolder)
{
DirectoryInfo dirInfo = new DirectoryInfo(pathToRootFolder);
DirectoryInfo[] dirs = dirInfo.GetDirectories();
foreach (DirectoryInfo dir in dirs)
{
string relativePath = (dir.FullName).Replace(pathToRootFolderPrefix, "");
TreeNode folderNode = new TreeNode(dir.Name, relativePath);
if (dir.GetDirectories().Length > 0)
{
folderNode.PopulateOnDemand = true;
folderNode.Collapse();
}
folderNode.NavigateUrl = "";
folderNode.SelectAction = TreeNodeSelectAction.SelectExpand;
TreeView1.Nodes.Add(folderNode);
}
}
private void LoadChildNode(TreeNode treeNode)
{
string d = treeNode.NavigateUrl;
string action = treeNode.SelectAction.ToString();
string fullPath = Path.Combine(pathToRootFolderPrefix, treeNode.Value);
DirectoryInfo dirInfo = new DirectoryInfo(fullPath);
DirectoryInfo[] dirs = dirInfo.GetDirectories();
foreach (DirectoryInfo dir in dirs)
{
string relativePath = (dir.FullName).Replace(pathToRootFolderPrefix, "");
TreeNode folderNode = new TreeNode(dir.Name, relativePath);
if(dir.GetDirectories().Length>0){
folderNode.PopulateOnDemand = true;
folderNode.Collapse();
}
folderNode.NavigateUrl = "";
folderNode.SelectAction = TreeNodeSelectAction.SelectExpand;
treeNode.ChildNodes.Add(folderNode);
}
}
//MSDN:Occurs when a node is selected in the TreeView control.
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
}
Thanks
I have a list of node ids and I want to display the 'page' view of each one. For various reasons, I don't want to do this with views, and don't think I should need a module. Just an API call to theme('node'). Something like:
$nids = array(3,4,5);
foreach ($nids as $nid) {
$node = node_load($nid);
$result .= theme('node', $node);
}
but I'm not getting back the full page view of the node. I added this to my node-[type].tpl.php file:
if ($page) print "PAGE MODE ";
else print "NOT PAGE ";
if ($teaser) print "TEASER MODE ";
else print "NOT TEASER ";
and got:
NOT PAGE NOT TEASER
I seem to be in some kind of limbo. I suspect there's an argument that I add to the theme function, but the terms are all so general (theme, teaser, page, node), I'm having trouble with my google-fu.
We have some legacy applications which are running on our Win 2000 machines for a long time. There are few Win 2003 machines as well. We are planing to decommission these Win 2k server and move these applications to Windows 2003.
Will there be any issues in running these vb6 applications? Should I worry about anything specific to Win 2000 and Win 2003?
Can I use the compatibilitymode if I have any issues?
Hi All,
I am writing an application that can record a 3GP video.
I have tried both MMAPI and Invoke API. But have following issues.
Using MMAPI:
1. When I record to stream, It records video in RIMM streaming format. when I try to play this video player gives error "Unsupported media format.".
2. When I record to a file. It will create a file of size 0.
Using Invoke API:
1. In MMS mode it does not allow to record a video more than 30 seconds.
2. In Normal mode size of the file is very large.
3. Once I invoke camera application I do not have any control on application.
Here is my source code:
_player = javax.microedition.media.Manager
.createPlayer("capture://video?encoding=video/3gpp&mode=mms");
// I have tried every encoding returns from System.getProperty("video.encodings") method
_player.realize();
_videoControl = (VideoControl) _player.getControl("VideoControl");
_recordControl = (RecordControl) _player.getControl("RecordControl");
_volumeControl = (VolumeControl) _player.getControl("VolumeControl");
String videoPath = System.getProperty("fileconn.dir.videos");
if (videoPath == null) {
videoPath = "file:///store/home/user/videos/";
}
_recordControl.setRecordLocation(videoPath + "RecordedVideo.3gp");
_player.addPlayerListener(this);
Field videoField = (Field) _videoControl.initDisplayMode(
VideoControl.USE_GUI_PRIMITIVE,
"net.rim.device.api.ui.Field");
_videoControl.setVisible(true);
add(videoField);
_player.start();
ON start menu item Selection:
try {
_recordControl.startRecord();
} catch (Exception e) {
_player.close();
showAlert(e.getClass() + " " + e.getMessage());
}
On stop menuItem selection:
try {
_recordControl.commit();
} catch (Exception e) {
_player.close();
showAlert(e.getClass() + " " + e.getMessage());
}
Please let me if I am doing something wrong.
Thanks,
Pankaj
I'm trying to get an app on the WinMo App Store.
As part of this, Microsoft App's Store has asked that I need to support landscape as well as portrait.
What they've said is OK is:
If dynamic switching is implicitly allowed, the
app will be tested just as if it
supports both portrait and landscape
even if only a portrait or landscape
resolution is checked.
You may explicitly lock the app in one orientation (which means
portrait mode if the app does not
handle landscape mode functions), provided the default OS orientation is preserved once the app exits.
I'd love to do answer 2 - but I can't find any way of doing it - and they won't provide me any other clues - they suggested I ask on the forums... so here I am on Stack Overflow - far better than on the forums :)
Anyone got any suggestions?
We have a Windows 2003 server with Cebos MQ1 (ver. 7 and ver. GRI) products installed that have been operational for years. After installing Microsoft 2010 C++ Redistributable package needed for other development, the MQ1 GRI service now fails to start.
Event logs showed that two additional updates (.NET4 and the 2010 C++ Redistributable SP2) where installed by the redistributable as well. As soon as we discovered the MQ1 service was not starting properly, we removed these three installed packages. However the service still does not start; the dialog that pops up states 'The service started then stopped. '.
Event logs when we attempt to start the service show nothing; IE: No errors, crashes, failures, or other information related to this service. Executing the MQ1Serv.exe directly specifies an issue of 'Missing command line operation, must specify install, uninstall and company abbreviation.' sc query MQ1Service(GRI) shows a clean exit for the Win32ExitCode of 0x0. Attempting to reinstall the client or server software gives an error of 'The procedure entry point ReInitializeCriticalSection could not be located in the dynamic link library KERNEL32.dll.' at the 'Registering Libraries' stage.
At this point, further research has stated that the required function is in URL.dll and to verify the library is not corrupted. Running an sfc /scannow on the server has replaced a few DLLS; including the URL.DLL to versions from 2005. This actually broke other applications which required a reinstall (one of them being IE 7). After reinstall and updates, url.dll version is 7.0.5730.13 (2009) and Kernel32.dll is version 5.2.3790.4480 (2009). The MQ1 GRI service still will not start, specifying the same error as previous 'Service started then stopped'. Running a disassembler on Kernel32.dll and Url.dll show no functions named ReinitializeCriticalSection.
Attempting the reinstall of the MQ1 client and server as well as starting the service again, fails once more. However, setting the compatibilitymode on the MQ1 client install exe to 'Windows 95' actually gets the program to install. Setting the compatibilitymode on the MQ1 server service does not enable it to start.
I have been researching this problem for nearly a week and besides the advice to scan and replace url.dll, have come to no successful conclusions. This service was operational prior to the 2010 C++ install, without any additional parameters or settings. After removing the C++ install and all servicepacks/updates it installed silently, still does not correct the issue of the MQ1 GRI service not starting.
Q: Has anyone else run into this or similar issue while attempting to get a service initialized? What have I overlooked or what else can I try in order to get this service started??
I am writing an app in using cocos2d. This method I have written for the selector goToFirstScreen: . The view is in landscape mode. I need to send an email. So, I need to launch the MFMailComposeViewController. I need it in portrait mode.
But, the control is not entering in to viewDidLoad of the mailMe class. The problem is in goToScreen: method. But, I do not get where I am wrong ?
-(void)goToFirstScreen:(id)sender
{
CCScene *Scene = [CCScene node];
CCLayer *Layer = [mailME node];
[Scene addChild:Layer];
[[CCDirector sharedDirector] setAnimationInterval:1.0/60];
[[CCDirector sharedDirector] pushScene: Scene];
}
Thank you .
Due to a bug that was fixed in C# 4, the following program prints true. (Try it in LINQPad)
void Main() { new Derived(); }
class Base {
public Base(Func<string> valueMaker) { Console.WriteLine(valueMaker()); }
}
class Derived : Base {
string CheckNull() { return "Am I null? " + (this == null); }
public Derived() : base(() => CheckNull()) { }
}
In VS2008 in Release mode, in throws an InvalidProgramException. (In Debug mode, it works fine)
In VS2010 Beta 2, it doesn't compile (I didn't try Beta 1); I learned that the hard way
Is there any other way to make this == null in pure C#?
I have 1 UIBarButoonItem on UINavigationBar.now as i'm moving view from portrait to landscape mode my UINavigationBar resizes Automatically but UIBarButtonItem not autoresizes
My UIBarButtonItem is at rightmost position
Per the title, Skype won't open, throws an APPCRASH error code #C0000005.
I have already tried:
Checking the "compatibility" setting
Removing the appdata/roaming/skype folder (it doesn't exist anyway)
Installing versions 5.3.113, 5.3.116, 5.3.120
Checking audio and video drivers for most recent updates
Uninstalling with "advanced" registry checking using Revo Uninstaller
Anyone got some gems of experience to throw my way?
(Unfortunately, it's someone else's computer, and they don't know the last thing they did before it stopped working...)