Jānis

1

votes
2

answer
31

views

Magento 2 collection loads before setting page limit

I'm getting memory exhaustion error when executing mass action on a model with large amount of records. I'm trying to optimize this by setting an limit on the collection, however it seems that the full collection is loaded before the limit is even set. Here's the code that causes the memory exhausti...
Janis Gaikens
1

votes
0

answer
42

views

Braintree Integration - Error: Class not found: com.braintreepayments.api.dropin.DropInRequest

so we are currently trying to integrate Braintree in our Android App in Sandbox Environment. We have set up a server with WAMP, which is generating a client token. That is working. However, when we are trying to start the payment the following error message appears in logcat: 'E/Parcel: Class not f...
Janis Hoffäller
1

votes
0

answer
24

views

How to deal with web fonts acting up?

How to deal with web fonts acting up sometimes in Print mode – some chunks of text not being displayed? It's not that easy to reproduce it, but it happens now and then, in Google Chrome (Windows). When it happens, one opens a page that has a hidden/toggle-able section in a smaller font (but same f...
Jānis Elmeris
1

votes
1

answer
457

views

Versioning SharePoint binary Workflow ASPX task forms

As noted by some developers, workflow versioning is somekind of headache in SharePoint. I`m wondering is there a way I can version my aspx forms? For sure, i can version code behind assemblies, but if markup changes for any of my files in LAYOUTS folder? Is there versioning available for files or do...
Janis Veinbergs
1

votes
2

answer
2.1k

views

File not found error in Zend Framework

I didn't notice exactly when, but during a coding session today, an error appeared: Not Found The requested URL /index.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. This is displayed whenever I submit...
1

votes
1

answer
110

views

Insert rows of states and iso's from comma separated textfile into webbased Mysql

I'm building an international webshop and in the part where a customer has to fill in the address I wonder how I insert the rows in a comma separated text file with a list of stats in my web based MySQL? Example AM,04,'Geghark'unik'' AM,05,'Kotayk'' AM,06,'Lorri' AM,07,'Shirak' AM,08,'Syunik'' AM,09...
Janis
1

votes
1

answer
553

views

XML generation error

I'm trying to generate an XML output with Zend_Framework, but this nasty thing keeps popping up: XML Parsing Error: XML or text declaration not at start of entity Location: http://cart/index/kurpirkt Line Number 2, Column 1: ^ As far as I know there are no white-spaces in any of my include files, an...
Janis Peisenieks
1

votes
2

answer
1.1k

views

jQuery ui-tabs load after the page loads

I need to create some tabs after the DOM has loaded. I create the neccessary markup using jQuery's append, and then create the tabs, but they are not working. The style is applied as it should, the tabs are shown, but all of the tab content is displayed immediately, and the tabs do nothing, when cli...
Janis Peisenieks
1

votes
1

answer
267

views

jQuery datepicker return on Ajax. Should I eval()?

I'm creating a form builder using Zend_Framework and jQuery. I've run into a hypothetical question, that I would like an answer to. While building a form, the Ajax returns an element, that should be a datepicker. I know, that I can turn the input into a datepicker by using a default class, like .cal...
Janis Peisenieks
1

votes
1

answer
505

views

tinymce doesn't obey extend_valid_elements

I'm trying to set up tinyMCE so that it would work with google maps iframe. TinyMCE cleanup procedure strips that iframe out. So i found a solution here and there, that says i need to insert an extend_valid_elements : 'iframe', into tinyMCE.init. But anyway, it will strip out my iframe. I tried addi...
Janis Veinbergs
1

votes
1

answer
231

views

Regex not finding all variables

I'm parsing some HTML, that I have generated in a form. This is a token system. I'm trying to get the information from the Regexp later on, but somehow, it's turning up only the first of the matches. I found a regexp on the Web, that did almost what I needed, except of being able to process multiple...
Janis Peisenieks
1

votes
1

answer
573

views

Does twitter button shows tweets or tweets+retweets?

Will the number on tweet button on my site increase if someone on twitter, without even opening the link, shares the url? Can one user make tweet button count go from 0 to 2 in any way?
Janis Veinbergs
1

votes
1

answer
72

views

Override/map 3rd party control to my custom control

Somewhere I've seen an article that showed how to override or map 3rd party control to my own custom control. But now I can't find that link nowhere in bookmarks and I tried googling without success. For example, I've a SharePoint and it uses their, say, DATEPICKER Control all over the place. But I...
Janis Veinbergs
1

votes
1

answer
68

views

Rule of thumb for Module count in Zend Framework

I've started work on a new project, and I decided to also learn something new along the way. So, I forked a project on github, that claims to be done with best practices in mind. The thing that I am wondering about, is this: Is there a rule of thumb, how many modules should I have? And by modules I...
Janis Peisenieks
1

votes
1

answer
191

views

Finding free space on a PDF page on Android

I need some sort of an algorithm, that would try to find free space on a specified page of a PDF. The space I'm looking for is a square 100x100 pixel large. I would like to start searching from the bottom right, move further left in a row, and then gradually move up rows, until I either find a suita...
Janis Peisenieks
1

votes
1

answer
844

views

Get exception class in kSoap2 on Android

I've got a fault message. I've successfully caught it on Android. What I would like now, is to get the Class for the Exception that triggered the fault. The message goes like this: S:Server Error retrieving user`s [..] EError retrieving user`s [..] I've removed a part of the trace, because it is not...
Janis Peisenieks
1

votes
2

answer
443

views

Need help optimizing script that hides table rows

I made this Greasemonkey script: var maxpi = 250; var p1 = '/html/body/div/div[2]/div/div[2]/table[2]/tbody/tr[1]/td[11]'; var p2 = '/html/body/div/div[2]/div/div[2]/table[2]/tbody/tr[2]/td[11]'; .. var p25 = '/html/body/div/div[2]/div/div[2]/table[2]/tbody/tr[25]/td[11]'; var r1 = '/html/body/div/d...
Janis Solovjovs
1

votes
2

answer
131

views

Multiple Asymmetric key pairs for one user?

I'm creating an Android application, that at first needed to be able to transmit data to the server securely. So I thought of RSA. I would send the public key to the user, let him do what he must, then receive back and decrypt via private. That is all fine. But now it seems, that there should also...
Janis Peisenieks
1

votes
1

answer
2.6k

views

Socket.IO Java Client to Jar

I'm trying to compile Socket.IO Java client to JAR file but have no luck. I need it for Android project to comunicate with Node.JS Socket.IO. The Socket.IO Java client is this one: https://github.com/Gottox/socket.io-java-client I do it like its said in github wiki, but no luck: cd $PATH_TO_SOCKETIO...
Jānis Gruzis
1

votes
2

answer
1.2k

views

Whats the reason for “Deprecated encryption algorithm”?

Was having a look at sys.dm_os_performance_counters to find out what deprecated features is used on my SQL Server 2008 R2: SELECT [object_name], instance_name, cntr_value FROM sys.dm_os_performance_counters WHERE [object_name] LIKE '%:Deprecated Features%' And cntr_value > 0 Order By cntr_value desc...
Jānis
1

votes
3

answer
647

views

Android: Regular UI Updates & Communication Service <-> Activity

So what I'm trying to do is just updating an activity's views in intervals like, say, once per second. In this specific case a handful of buttons, and all I want to change is their text. I've read quite a few questions here addressing the same problem, but I seem to be stuck a little more than other...
Janis F
1

votes
1

answer
13.4k

views

Partial Page Rendering using Primefaces - update is fired too early when using <ui:include>?

I have a Webapp using Primefaces 3.3.1 (runnning on Glassfish 3.0.1) in which the user can choose the desired content in a menu. Since only a part of the page is to be refreshed, I want to use partial page refreshing with AJAX. The method to store the URL is provided in the actionListener-attribute...
Janis K.
1

votes
1

answer
527

views

2D arrays in NSPointerArray

I'm creating many 2D int and float C arrays and was going to assign their pointers to NSPointerArray. Everything is fine while I create and populate them with data, but when I do addPointer on array I get EXEC_BAD_ACCESS. Q1-Why this is wrong? Q2-What is the best approach providing access to many 2...
Janis Jakaitis
1

votes
2

answer
178

views

Clicking in one spot, registering as a click somewhere else

So I am using the expandable lists as presented here (with a demo here), and so far the JavaScript code allows for a list to be expanded when the line immediately preceding it is clicked. I would like for the list (just one, not all) to expand when a line (or rather word, say word) somewhere else, n...
1

votes
1

answer
212

views

Parameter.GetType() - Does the type has to be known at compilation time?

is something like this possible - and if so how? Public Sub CreateGenericList(ByVal SampleObject As Object) Dim genericList as new List(Of SampleObject.GetType()) End Function I want to create a class that is able to deserialize a given XML-file. The XML-file contains serialized values of a custom...
Janis
1

votes
1

answer
202

views

Reused DataGrid control values repeat

The problem is, when I edit programmatically column values in datagrid and scroll down, those values repeat in next cells of column which become visible. This seems like virtualization bug or 'effect' since when I switch it off, problem disappears. I think the problem is in this place: public void E...
Jānis Gruzis
1

votes
1

answer
539

views

CGPathAddEllipseInRect always the last color

iOS 7. Why both circles are green when CGContextSetRGBStrokeColor values are different. I see that the last color is set to both paths ... Why is this? How to color each path differently? - (void)drawRect:(CGRect)rect{ CGContextRef ctx = UIGraphicsGetCurrentContext(); CGMutablePathRef centerCirlce =...
Janis Jakaitis
1

votes
1

answer
1.9k

views

SSIS How to import xml elements into table

I am using XML source in SSIS to import XML file into SQL Server database. I am not using all detail elements from XML file. But I want to save original element with all details in case they are needed at some point in future. Lets say xml: Some row hi ho Some row2 hi2 ho2 Intended result in struc...
Jānis
1

votes
1

answer
3.2k

views

Adding shortcut to All Users start menu

I have a problem with creating a shortcut in the All Users start menu (C:\ProgramData\Microsoft\Windows\Start Menu). Set wsc = WScript.CreateObject('WScript.Shell') Set lnk = wsc.CreateShortcut('C:\ProgramData\Microsoft\Windows\Start Menu\My app.LNK') lnk.targetpath = 'C:\Program Files\my app\my ap...
Jānis Skrastins
1

votes
1

answer
1.4k

views

How to make IE 11 wrap flexbox items when the flex container is inside a floating element?

I'm trying to add a flexbox element to the content area of a two column layout. The layout has a fixed width sidebar and fluid content. It uses float: left and negative margins to achieve this. The goal is for the flex container to be 100% width of the parent. Flex items should be displayed in rows...
Janis Elsts
1

votes
1

answer
58

views

ArcusNode Cannot set property '1' of undefined

My problem is the one discribed in this issue - https://github.com/OpenRTMFP/ArcusNode/issues/5 ArcusNode is dumping the same error for me when I try to stream video to client with RTMFP. The streamer part is in this repository: https://github.com/JanisGruzis/RtmfpStreamer The receiver part is in th...
Jānis Gruzis
1

votes
2

answer
51

views

Recursively resolve User Reference in Entity Framework

I don't quite understand what happens to my user reference when retrieving a data object in my ASP.NET app. Sketch of the code: public class DataPoint { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } public ApplicationUser Owner { get; set; } // data } Here'...
Janis F
1

votes
2

answer
40

views

Filter information in two columns

I need a hint is solving Excel task. I have two columns with data (let's say column A contains a list of people I have met in May; column B a list of people I am planning to meet in June). Is there a function in Excel which will compare both columns and give me a list of people whom I have met in M...
Janis Daksa
1

votes
1

answer
1.3k

views

Triangular mesh queries in Python

I am looking for a Python library which would support mesh queries. For now, I have looked at openmesh, but I am a bit afraid that would be an overkill for my small master thesis project. The features which I need is: to iterate over vertices around a given vertex iterate over all edges, faces, ver...
Jānis Erdmanis
1

votes
1

answer
266

views

Mocking OpenXML with Moq

How should I test the following GetWorksheetPart method: public class ExcelDocument : IExcelDocument { private readonly string _filePath; public ExcelDocument(string filePath) { _filePath = filePath; } public WorksheetPart GetWorksheetPart(ISpreadsheetDocument excelDoc, string sheetName) { Sheet she...
Janis S.
1

votes
1

answer
40

views

InvalidCast Exception from Int32 to DateTime - but where?

I am using the following raw SQL code through NHibernate, and I can't find more sample code to compare with, but it blows up with an InvalidCastException (Int32 to DateTime) var query = session.CreateSQLQuery('SELECT COUNT(*), MIN(Created), MAX(Created)' + ' FROM MyStuff WHERE Created < :deadline')...
Janis F
1

votes
1

answer
1.1k

views

Manage frames in selenium C# WebDriver

Need to understand some better practices handling elements within frames. Selenium WebDriver only works within the context of a frame/main document. It cannot locate elements for other frames before I IWebDriver.SwitchTo() it The pain is I constantly have to switch between frames. At no point I can...
Janis Veinbergs
1

votes
1

answer
396

views

jQuery ajaxForm plugin double file upload

So I have searched all internet for answer but nothing... The problem is that using ajaxForm malsup plugin it submits my files twice. HTML: JS: var options = { clearForm: true, beforeSend: function() { }, uploadProgress: function(event, position, total, percentComplete) { }, success: function(resp...
Jānis Veiss
1

votes
3

answer
110

views

Creating a Sequence with nested ifelse, depending on different Value ranges and NAs, will give wrong result

I have a dataframe like this: time Value Seq.Count 1 0 0 2 0 0 3 3 0 4 4 0 5 10 0 6 10 0 7 10 0 8 7 0 9 6 0 10 NA 0 11 NA 0 12 NA 0 13...
Janis S.
1

votes
1

answer
281

views

Group by LINQ vs group by SQL

I have the following query in SQL which I would like to convert to LINQ statement. select AreaId, BrandId, MilestoneId, DocumentCategoryId from Document group by AreaId, Brandid, MilestoneId, DocumentCategoryId I have tried, e.g., var docs = from d in documents group d by new { d.Area, d.Brand, d.Mi...
Janis S.

View additional