Use & ldquo; Global-namespace & rdquo ;;

I just wonder if there's a way to make a class behave as if it is in global namespace using a "use" keyword, so this class would behave as namespaced class only from outside of the class. Something like: namespace wherever\somewhere\deep\deep\in

App.Config escaping

I have this app.config which contains FolderPath under AppSettings node. During testing, the QAs used the path: C:\directory\test & test on FolderPath value that made the application crash on startup. I know it's the unescaped character (specifically

The VB.NET Array Contains method does not work

In VB.NET I am trying to determine in a given string exists in a String Array. According to my research the Array has a 'Contains' method that I can use, so the Code looks something like this: Dim fileTypesZ As String() = {"PDF", "TXT"

Focus on any application with Java (OSX)?

How can I set the focus (e.g. cmd+tab) of an arbitrary application (Java or not) from a Java program, on OSX? Looking for an answer to this question, I came across this question, but it doesn't really help for OSX. EDIT: one possibiltiy seems to be t

The graph for a polar equation is incomplete in matplotlib

I'm currently trying to graph the equation r = 4 * sin(2 * theta) in the polar plane using matplotlib, based off of the linked example. Here's my code: import numpy as np import matplotlib.pyplot as plt from math import sin, pi def plot_polar(f, star

How to create a new window in the mfc project

hi im using c++ mfc. i have main window which works all the time and i want to make new window. how can i do it? thanksHi you can create your own dialog by VS master and then do // on some event CMyDialog dlg; dlg.DoMoDal(); link http://www.codersour

Problem with the Akrabat zend framework tutorial

I have asked this question earlier today but I didn't provide enough information and therefore it was migrated to the serverfault forum. Well since I think it's not really a server releated problem rather a php related problem i woul lik to ask it he


Task: grabbing arbitrary frames from mpeg2 video files. Now I use custom render filter for grabbing, but problem with positioning video on required frame. I use SetPosition(), after Pause() for passing frames through graph, wait for filter receive fi

Powershell: C style function overloaded with parameter sets?

In C#, function overloading has historically appeared something like the following, where each overload adds some amount of parameters on top of the simpler signatures: public void Initialize(int version); public void Initialize(int version, string w

url rewriting in php localhost with .htaccess does not work

I want to rewrite url from http://localhost/Ent/Movie/Info.php?year=2011&movie=any_movie to http://localhost/Ent/Movie/Info/2011/any_movie I have tried many code in .htaccess,like Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAM

Arrival date Difference in Javascript

I've been searching to get the date difference in Javascript, but I am not quite getting the answers I need. When I compare 2015/12/02 to 2015/11/30, the date difference should be 2. But with my code, I get -28. how do I resolve this issue - also con

How to publish data with jQuery

I'm using PHP to submit a very simple data to db. On my page.php, I have a link, by clicking it I insert its id and some other data in the database. For example: echo "<a href='".$base_url."?submit=$page_id'> Submit it</a>"

Is it an anti-model? If yes, why? Otherwise, why not?

I'm working on a bit of code where we're creating object models but the models have generic keys. For example class myContact { var key; var value; } And then in the code instantiating them as follows myContact = new myContact() myContact.key = 'addr

Are there any APIs for parsing / extracting text in Java?

I want to know if there is an API to do text analysis in Java. Something that can extract all words in a text, separate words, expressions, etc. Something that can inform if a word found is a number, date, year, name, currency, etc. I'm starting the

Ignore branch branches as origin / private_ *

When I do git log --decorate --oneline --graph --all I would like to see a graph for all the branches but private branches of other developers. Can I tell git log to ignore branches matching a pattern, like git log --all --ignore-branches="origin/pri mvc layer division

I am new to mvc. I want to divide presentation layer with logic layer. I know it is already done in mvc but I want to have presentation layer on another machine. I don't know if this what I want to do, is possible, but just wanna ask.

How to make TensorFlow + Keras fast with a TFRecord dataset?

What is an example of how to use a TensorFlow TFRecord with a Keras Model and while keeping the dataset in tensors w/ queue runners? Below is a snippet that works but it needs the following improvements: Use the Model API specify an

Unable to open some html files in chrome (mac)

There are some HTML files (no pattern that I've figured out) that I can't open via the terminal, GUI or right clicking Open in Browser via Sublime Text 3. The default browser to open the file is definitely set to Chrome. When I say to open the file i

JS and PHP - Load php data after js signal without sending back

Alright so basically I have a flash login, which I handled to work with JS using ExternalInterface. I want the php to load only when the user has logged in, how is it possible to do this without sending a new postback (reloading the page)? What I bas

Passing a hidden field value to a user control in javascript

I have a HiddenField which changes value depending on what the user clicks. On the same page I have an invisible Panel with a User Control inside of it. I want to pass this value to the control when the Panel becomes visible. The code: <asp:HiddenFie

Where to make an initial AJAX query in ReactJS

I have a page where I need to load some initial Ajax data. I read on this Reactjs page that I should make the call in componentDidMount. What is the advantage of making the request from componentDidMount rather than componentWillMount ?Since react is