Orion Orion

1

votes
2

answer
132

views

Python re.sub() optimization

I have a python list with each string being one of the following 4 possible options like this (of course the names would be different): Mr: Smith\n Mr: Smith; John\n Smith\n Smith; John\n I want these to be corrected to: Mr,Smith,fname\n Mr,Smith,John\n title,Smith,fname\n title,Smith,John\n Easy en...
t.r.orion
1

votes
0

answer
80

views

Android - difficulty working with dimens.xml files

I'm working in Android Studio and attempting to use the layout preview and a dimens.xml file to adjust the layout for a Samsung S7 phone. I'm using multiple dimens.xml files selected by minimum screen width. I have three questions: 1) is it possible to force android studio to use a particular dime...
orion elenzil
1

votes
1

answer
284

views

Post XML to MVC Controller C#

I'm trying to post XML from www.domain1.com a controller in www.domain2.com. Here is my code: www.domain2.com [HttpPost] public ActionResult FetchProductsXML() { Response.ContentType = 'text/xml'; StreamReader reader = new StreamReader(Request.InputStream); String xmlData = reader.ReadToEnd(); var p...
Orion
1

votes
0

answer
23

views

Enumerating an iCloud Drive directory

I'd like to enumerate the files in a directory chosen by the user within a UIDocumentPickerViewController. I get the directory URL returned from the document picker. I call startAccessingSecurityScopedResource I create an NSFileCoordinator instance and begin coordinated read of the directory. Inside...
orion
1

votes
0

answer
334

views

VB.NET DLL “ActiveX component can't create object”

I am attempting to create a DLL in VB.NET using Visual Studio 2017. The DLL will be used in VBA in another application. The VB.NET project is a .NET Framework Class Library project. I've added the *.TLB file as a reference in VBA. I'm only trying to create and use one method in the class library....
Orion DeYoe
1

votes
0

answer
153

views

C# GetAsyncKeyState in a Windows Service

I wrote the following EXE File in C#: namespace Service { class Program { [DllImport('user32.dll')] public static extern int GetAsyncKeyState(Int32 i); static void Main(string[] args) { StartLogging(); } static void StartLogging() { while (true) { //sleeping for while, this will reduce load on cpu T...
Orion
1

votes
1

answer
23

views

what can i do about Intents and List view

I'm trying to create a list of places using android eclipse but suddenly i still don't understand how to create a intents but i already created a list using list view. i still can't understand how the intents works but for what i remember it shows a new form or tab after u click something in the lis...
Orion
1

votes
0

answer
30

views

ElectronJS: What's the safest way to load user's local files in the DOM (<video src=“C:\…”>)?

The application I'm developing will allow users to choose video files via native file chooser or drag and drop. The app will render a card to let the user trim the video, and set an output directory for the trimmed video (using ffmpeg to manage the video manipulation). I plan on storing the paths to...
Orion K.
1

votes
3

answer
1.6k

views

Does ServiceBase.OnStop get called when a .Net 2.0 service crashes?

When a .Net service crashes, does the ServiceBase.OnStop method get called? Will the service be marked as stopped regardless of whether or not the OnStop method is called?
Orion Adrian
1

votes
1

answer
830

views

Visual Studio 2008 Unit test does not pick up code changes unless I build the entire solution

Here's the scenario: Change my code: Change my unit test for that code With the cursor inside the unit test class/method, invoke VS2008's 'Run tests in current context' command The visual studio 'Output' window indicates that the code dll and the test dll both successfully build (in that order) The...
Orion Edwards
1

votes
2

answer
3.2k

views

Navigate HTML table columns with XPath 1.0

Using only an XPath expression (and not in XSLT or DOM - just pure XPath), I'm trying to create a relative path from the current node (in a td) to an associated td in the same column of the same HTML table. For example, suppose I have this type of data: Blue Jeans Shirt $21.50 $18.99 and I'm on th...
Orion Ifland
1

votes
1

answer
618

views

UIAutomation API shows menu bar when called from one app, but not another?

I have an application I'm trying to write an automated UI test for. The is a native C++ ATL application, which has a couple of controls, and a MenuBar. An automation client application written in C# can see the menu bar, but for no apparent reason, an equivalent application written in IronRuby canno...
Orion Edwards
1

votes
1

answer
383

views

opengl es - trying to get full-screen “trails” - single buffer mode or copy frontbuffer?

i'm trying to get a full screen 'trail' effect similar to the one here: http://elenzil.com/progs/js1k the traditional way to do this is to not clear the image at the beginning of rendering, but instead blend on a big polygon that's the color of the background and has low alpha. drawing the polygon i...
orion elenzil
1

votes
2

answer
246

views

Does IE 7 have a boxSizing property on the currentStyle object?

I know it doesn't actually act on it, but when I test IE 9 in IE 7 browser mode in IE 7 standards mode it returns the box-sizing property. I'm not sure if this is because I'm emulating IE 7 or if the real IE 7 has this property to. Ultimately I'm trying to determine if I should be using the border-b...
Orion Adrian
1

votes
1

answer
95

views

Why is the type of this template-class-owned class, using a template type, unrecognized?

I hope this hasn't been covered in some question before. I looked as best I could, but I think part of the problem in the first place is that I don't understand what is up, and that may have prevented me from finding a previous answer. My apologies if so, but otherwise... For practice with templates...
Orion
1

votes
1

answer
460

views

Android Bitmaps Bayer Patterns

I am attempting to load jpegs into Android using BitmapFactory, however, the images are in a different Bayer Pattern format then Android wants. Specifically, I have images in a BGGR and RGGB format. The RGGB formats seem okay, however, BGGR seems to have issues. Does Android have a method to conve...
orion
1

votes
3

answer
697

views

Identify date format in PLSQL

I'm trying to write a plsql stored procedure which identifies any date format and converts it into single datetime format 'mm/dd/yyyy hh:mi:ss'. How do I do it. I tried using case statment but there are so many date combinations that its not possible to write case statment for all of them. For ex: 2...
Orion
1

votes
2

answer
367

views

Ajax calls within nested divs not working for FireFox with MVC3

I have a cshtml page that has a link, and a div to display some content.
Johnny_Orion
1

votes
1

answer
1.3k

views

Can I use NSMutableArray insertObjects:atIndexes to insert multiple items in different order?

I'd like to insert a range of items into an NSMutableArray in a single operation using insertObjects:atIndexes, and sort the items at the same time - but I can't figure out quite how to build the correct NSIndexSet. Something like this: NSMutableArray* target = [[NSMutableArray alloc]initWithObjects...
Orion Edwards
1

votes
1

answer
406

views

Adding a MovieClip to a ScrollPane

Can anyone give advice on what would be a proper way to set a MovieClip as the source of a ScrollPane in ActionScript3? I wish to have a MovieClip (Lets call it 'A') that holds ten smaller movieclips (lets call them 'b'). Then, I would like to add 'A' to the ScrollPane and have the other ten 'b' mo...
Johnny_Orion
1

votes
2

answer
1.9k

views

Fabric.js: can't get the active groups anymore

I'm using fabric 1.4.10 and i noticed that i can't get the active groups anymore! Everytime i call canvas.getActiveGroup() even when a group is selected, i get null. My code to create groups: var circle1 = new fabric.Circle({ radius: 50, fill: 'red', left: 0 }); var circle2 = new fabric.Circle({ rad...
orion
1

votes
1

answer
2.2k

views

XCode 6.1 iOS 8.1 crashing- NSXMLParser does not support reentrant parsing

I met a problem with NSXMLParser. My source is run well in iOS7/XCode 5, but crashing in iOS8.1/XCode 6. Crashing error is: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSXMLParser does not support reentrant parsing.' I tried with other solution in this pos...
Orion
1

votes
1

answer
371

views

Python 'ascii' encode problems in print statement

System: python 3.4.2 on linux. I'm woring on a django application (irrelevant), and I encountered a problem that it throws UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) when print is called (!). After quite a bit of digging, I discovered I shoul...
orion
1

votes
2

answer
145

views

Multi-column condition in a data.table

Let DT be a data.table: DT 4, without using the column names?
Orion
1

votes
1

answer
104

views

Seeming evaluation of preprocessor code inside a #if false block

I'm working in C# via MonoDevelop 4.0.1 (Current version for Unity), and have hit a seeming language weirdness. Here's my entire .cs file: #if false #define foo #endif class myClass { int member; } #if false #error this error does not trigger #undef foo // 'cannot define or undefine preprocessor sym...
orion elenzil
1

votes
1

answer
1.2k

views

In TypeScript, how do I extend the ambient JQuery interface in an external module?

I'm creating jQuery plugins using external modules in TypeScript. It seems as that if I add the interfaces directly to the modules I cannot add the new methods to the JQuery ambient interface declaration. E.g. in jquery.d.ts declare interface JQuery { ... text(): string; text(text: string|number|boo...
Orion Adrian
1

votes
1

answer
82

views

PHP json_encode outputs numbers with quotes

I have an array generated with the following code where $result is a collection with Salesman a string field and col1 an integer field $data=[]; $arr = ($result->get()); $j=0; foreach($arr as $res) { $data[$j] = [$res->shortName,$res->col1]; $j++; } And when i pass this array to Google Charts using...
Orion
1

votes
2

answer
164

views

Pentaho Adding summary rows

Any idea how to summarize data in a Pentaho transformation and then insert the summary row directly under the group being summarized. I can use a Group By step and get a summarised result stream having one row per key field, but what I want is each sorted group written to the output and the summary...
orion_kid
1

votes
1

answer
393

views

How to get Solr field type

Is there any way of getting the metadata for a solr core ? For instance I know the core name, and can obtain a SolServer from that and I also know the field name. Is there any way to determine the metadata though. Specifically I would like to know whether the field type is an int or a double. Thanks
orion_kid
1

votes
1

answer
162

views

Index and Iterate over CollectionType in swift

I have code which is basically like this: func arrayHalvesEqual(data:[UInt8]) -> Bool { let midPoint = data.count / 2 for i in 0..
Orion Edwards
1

votes
1

answer
192

views

Capybara integration testing 'TextAngular' input

Using TextAngular for a rich text input box in a AngularJS/ Rails environment. Running integration tests with Capybara/Selenium & Capybara-Webkit. Tried to create an integration test that inputs text into the text area for a test. However, I have not been able to successfully do this. The thing t...
orion
1

votes
1

answer
322

views

how to link dramsim2 library interface with a PINtool

I want to use DRAMSim2 as library interface in a developing PINtool. I try to be familiar with dramsim_test.cpp that includes dramsim_test.h, that includes DRAMSim.h (in a specific directory). If i put these files in the directory of my PINtool an include them (except .cpp. for this i use the code i...
Orion Papadakis
1

votes
2

answer
70

views

Multiple controllers working within ngRoute example

I have a small ngRoute example I am trying that to use multiple applications and controllers with. The first app/controller is for the main page, while the second set of app/controller is for the html that ngRoute loads up after pressing a button. However, it doesn't seem to be working. Code belo...
Johnny_Orion
1

votes
1

answer
187

views

How to “right-align” and “left-align” data.frame rows relative to NA cells?

DF = structure(list(id = c(10, 11, 13), YR1 = c(NA, 1, NA), YR2 = c(NA, 2, 1), YR3 = c(1, 1, NA), YR4 = c(1, 1, 1), YR5 = c(NA, NA, 1)), .Names = c('id', 'YR1', 'YR2', 'YR3', 'YR4', 'YR5'), row.names = c('1', '2', '3'), class = 'data.frame') id YR1 YR2 YR3 YR4 YR5 1 10 NA NA 1 1 NA 2 11 1...
Orion
1

votes
1

answer
270

views

Additional information: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM

I am working updating customer details in gridview. Here, I am using 3 tier architecture. I am trying to update certain fields. But, I end up getting above mentioned error. Here is my code. protected void MyProfileGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { int customerId = Co...
Orion
1

votes
1

answer
350

views

intel pin with docker

i have a pintool that runs normaly with this command: ../../../pin -injection child -t obj-intel64/mypintool.so -- obj-intel64/myexcecutable i want in the position of myexcecutable to put a docker program which runs with this command: docker run --rm --net spark-net --volumes-from data \ cloudsuite/...
Orion Papadakis
1

votes
2

answer
53

views

Find max element in a matrix [duplicate]

This question already has an answer here: How to pass 2D array (matrix) in a function in C? 6 answers I've got this homework. Basically, what I have to do is complete the following code that returns the maximum element of a bidimensional array of 'r' rows and 'n' columns. #include int max_element(...
Orion
1

votes
1

answer
1.2k

views

Zf3 Acl: factory registration error

im trying to implement an ACL in ZendFramework 3 without success. I following the first answer at this question: How to implement acl and authorization in Module.php in zf3 but when i try to retrieve the service I receive the exception: Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\...
Orion
1

votes
1

answer
330

views

IIS Directory Services

I am trying to get the website id from IIS on Windows Server 2012 R2. I want to fetch the Id, then add a website pointer for the website in IIS. I'm not sure where to grant the permissions for the code to work and at the same time, not leaving my web server vulnerable. Here is my code for fetching I...
Orion
1

votes
1

answer
140

views

Windows 10 bootmgr Help: viewing the source code

I am in a process of learning things in reverse order for fun, and I have decided to dissect Windows 10, bit-by-bit, and learn what makes a great OS function. And I also suppose that my question will be geared in other ways as well. My question is, how do I look at something like Windows bootmgr sou...
Orion Wilson

View additional