What are the differences between these built-in Python data types: list, sequence and slice? As I see it, all three essentially represent what C++ and Java call array.
I plan to make a replacement for the Windows 7 start menu, and I would like to know if that's even possible. I understand that the start menu is part of explorer.exe but I do not intend to replace explorer.exe.
Is it possible to launch the replacement start menu by clicking the native start orb?
Is it also possible to launch the replacement by pressing the Windows key or ctrl+esc ?
Is the Windows key a macro for ctrl+esc ? or is it two different hotkeys that do the same thing?
May I know if there is any software that do any one of these things?
Isn't there some way to re-write the following code, such that I don't need a gigantic switch statement with every conceivable type? Also, if I can replace the switch statement with some way to dynamically create new controls, then I can make the code smaller, more direct, and don't have to anticipate the possibility of custom control types.
Before:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
import mx.containers.HBox;
import mx.controls.Button;
import mx.controls.Label;
public function CreateControl(event:Event):void {
var Type:String=Edit.text;
var NewControl:Object;
switch (Type) {
case 'mx.controls::Label':NewControl=new Label();break;
case 'mx.controls::Button':NewControl=new Button();break;
case 'mx.containers::HBox':NewControl=new HBox();break;
... every other type, including unforeseeable custom types
}
this.addChild(NewControl as DisplayObject);
}
]]>
</mx:Script>
<mx:Label text="Control Type"/>
<mx:TextInput id="Edit"/>
<mx:Button label="Create" click="CreateControl(event);"/>
</mx:WindowedApplication>
AFTER:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
import mx.containers.HBox;
import mx.controls.Button;
import mx.controls.Label;
public function CreateControl(event:Event):void {
var Type:String=Edit.text;
var NewControl:Object= *???*(Type);
this.addChild(NewControl as DisplayObject);
}
]]>
</mx:Script>
<mx:Label text="Control Type"/>
<mx:TextInput id="Edit"/>
<mx:Button label="Create" click="CreateControl(event);"/>
</mx:WindowedApplication>
I have installed Windows Server 2012 for about 9 months ago. Earlier I could connect to my server with an external IP perfectly, but the license for the remote desktop services has ended.
First, I thought it was the reason, why I couldn't use my server as RDP-server, to which users may connect.
But, than in web I read, that it's possible to use windows native features, just to remove the RDP services, which are trial and the server will work as RDP-server, but with some limitations ( for e.g. such free RDP service may accept only 1 connection and other connection will be disconnected etc ).
Is it true, that it's possible? If yes, please give a piece of advice, how should I repair it.
Because I don't want to use TightVNC or other stuff.
Thanks!
I have an IPSec VPN on my Windows 7 machine (all using the native Windows 7 gateway). The host I am connecting to has different ISAKMP "Phase 1" and "Phase 2" IP addresses.
As I understand, the Phase 1 address is that of the IPsec endpoint, to which I can connect just fine. The Phase 2 address is found in their "crypto map", and the addresses need to match. At the moment, both my Phase 1 and Phase 2 addresses are configured the same.
On my side, I get the error "Error 791: The L2TP connection attempt failed because security policy for the connection was not found"
How can I configure the Phase 2 IP address for my Windows 7 IPSec VPN to be different to the IPSec endpoint address?
Hi,
In Scheme, procedures like +, -, *, / works on different types of numbers, but we don't much see any other generic procedures.
For example, length works only on list so that vector-length and string-length are needed.
I guess it comes from the fact that the language doesn't really offer any mechanism for defining generic procedure (except cond of course) like "type classes" in Haskell or a standardized object system.
Is there an idiomatic scheme way to handle generic procedures that I'm not aware of ?
So I have a big problem at the moment. Trying to find a reliable solution for syncing 2 windows IIS servers. I need to keep the web content imaged on both. Now I have been trying to use Rsync to this point, but unfortunately file permission errors are a nightmare to manage this way.
I'm testing out dropbox, but the performance sucks. I'm more familiar with Linux stuff and I've used Rsync in the past but isn't there a native windows solution that will work?
Let's say I have an ORACLE schema with contains a package.
That package defines types, functions, procedures, etc:
CREATE PACKAGE...
DECLARE
FUNCTION ...
PROCEDURE ...
END;
Is there a query I can execute to get the definitions of those individual objects, without the wrapping package?
Connecting a Dell Studio Slim to a Dell ST2210 21.5" monitor. The PC has a ATI Radeon HD 4350 video card. The video card has DVI and HDMI connections. When I connect with the DVI everything works fine. When I connect with the HMDI the image doesn't fill the screen, i.e. there's a approx 1 inch black border around the image. Win7 tells me the res is 1920x1080 (the native res of the monitor). Tried rebooting, no luck.
hi,
I'm using JQuery Media module to integrate my own flash video player with Drupal website.
I've tested everything on a local drupal installation and it works great. However I've updated an online drupal website and the player is not used. I can only see this message:
"Use SwfTools Module to play FLV files if you only convert/upload FLV videos or FlowPlayer Module must be enabled in order to play FLV videos with other types."
thanks
Calculate the convolution of the following signals (your answer will be in the form of an equation):
h[n] = delta[n-1] + delta[n+1], x[n] = delta[n-a] + delta[n+b]
I'm lost as to what I do with h and x. Do I simply multiply them? h[n]*x[n]? I programmed convolution with several types of blurs and edge detectors, but I don't see how to translate that knowledge to this problem. please help!
Hi I found this function in a utilities code file:
Version 1:
public static bool IsValidLong(string strLong)
{
bool result = true;
try
{
long tmp = long.Parse(strLong);
}
catch (Exception ex)
{
result = false;
}
return result;
}
I want to replace this (and validators for other types) with following:
Version 2:
public static bool IsValidLong(string strLong)
{
long l;
return long.TryParse(strLong, out l);
}
which version is better and why?
I'm using wine 1.5.11 on Archlinux, and I try to launch this old game :
http://www.cnetfrance.fr/telecharger/waterboy-11006056s.htm?download=1
The problem is that I always get a
"Run-time error '13' : Type mismatch"
when I try to launch it.
I've tried to switch oleaut.dll and ole32.dll to "native", and switch to "Windows 98" mode using winecfg, and then I had this error :
err:module:import_dll Library ole32.dll (which is needed by L"Z:\\games\\WaterBoy\\MSVBVM50.DLL") not found
err:module:import_dll Library OLEAUT32.dll (which is needed by L"Z:\\games\\WaterBoy\\MSVBVM50.DLL") not found
err:module:import_dll Library MSVBVM50.DLL (which is needed by L"Z:\\games\\WaterBoy\\WaterBoy.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\games\\WaterBoy\\WaterBoy.exe" failed, status c0000135
I've installed vb5runtime using winetricks, but it didn't help.
Am I doing something wrong ?
I want to subclass a numeric type (say, int) in python and give it a shiny complex constructor. Something like this:
class NamedInteger(int):
def __init__(self, value):
super(NamedInteger, self).__init__(value)
self.name = 'pony'
def __str__(self):
return self.name
x = NamedInteger(5)
print x + 3
print str(x)
This works fine under Python 2.4, but Python 2.6 gives a deprecation warning. What is the best way to subclass a numeric type and to redefine constructors for builtin types in newer Python versions?
how can I eliminate duplicate elements from an array of ruby objects using an attribute of the object to match identical objects.
with an array of basic types I can use a set..
eg.
array_list = [1, 3, 4 5, 6, 6]
array_list.to_set
=> [1, 2, 3, 4, 5, 6]
can I adapt this technique to work with object attributes?
thanks
Since I've a similar function for 2 different data types:
func GetStatus(value uint8) (string) {...}
func GetStatus(name string) (string) {...}
I would want to use a way more simple like:
func GetStatus(value interface{}) (string) {...}
Is possible to create a generic function using an interface?
The data type could be checked using reflect.Typeof(value)
I get some json data form the web which is like:
[{"pk": 1, "model": "stock.item", "fields": {"style": "f/s", "name": "shirt", "color": "red", "sync": 1, "fabric_code": "0012", "item_code": "001", "size": "34"}}, {"pk": 2, "model": "stock.item", "fields": {"style": "febric", "name": "Trouser", "color": "red", "sync": 1, "fabric_code": "fabric code", "item_code": "0123", "size": "44"}}]
How can i use it in the C# winforms desktop application. I already get this data in the form of string.
All types of answer are welcome.
I have a domain blah.com that was aquired a while back by my company foo.com. I set up a two way trust between the two domains, but now I want to move their servers into our forest, while keeping the domain name of blah.com.
Is this possible?
What things do I need to consider when doing this?
I know I can't move the domain from its forest into our forest.
blah.com is a 2003 native domain/forest
foo.com is a 2008R2 domain/2003 forest.
I am trying to portabilize every program I use if possible, and Notepad++ is on the list. The only problem is that I've had a native installation until now so that I'm not totally sure which settings files need to be moved to the portable directory.
Surely there's a function tucked away somewhere in NPP exactly for this purpose, or some plugin out there? I mean the developers have literally thought of everything else, yet this is the one thing I cannot find specifically anywhere in the NPP wiki or otherwise, and I don't want to miss an important file.
Here is the closest I've gotten: Notepad++'s configuration files and Where are all the files?
Should I just copy every configuration file listed on the first link?
I have a load of media files on my PC, mostly AVI/MKV and some mpegs.
On windows, I would use ConvertXToDVD to convert these to DVD format, and to burn to disc. That application also lets you save a bit of space on the DVD to put the original file in its AVI format on as well.
How can I do this on linux? What are the alternatives to this Windows application? I could try to run ConvertXtoDVD under wine but I would prefer to find a native linux solution
Thanks in advance!
I'm going to refurbish the IT-infrastructure for a small organization with one single office, and I'm not sure what VPN server to use. In your opinion, would the built-in Windows Server 2008 VPN server suffice or are there any specific problems with it as opposed to, for example, OpenVPN?
I'd rather run a Windows native VPN server, but if there are few (preferably free) good alternatives, I could install VMware ESXi and virtualize both Windows and an OpenVPN-server. By the way, because of a low budget this office runs a solution with only one physical server.
Any advice would be great to help me grasp this field of which I'm quite a novice. Thank you!
I can initialize float32x4_t like this:
const float32x4x4_t = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error Incompatible types in initializer:
const float32x4x4_t =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct?
Hoogle allows you to search many standard Haskell libraries by either function name, or by approximate type signature. I find it very useful. Is there anything like Hoogle for Scala? Search in ScalaDoc 2 only finds types and packages by name.
Are there any tools that would assist us less artistic types in GWT 2.0 layout that use GWTxl? I'm fairly CSS impaired and would like to see how my changes look "on the fly".