Tim Tim

1

votes
3

answer
82

views

What's the simplest way to write a program/script to remove the same string from the beginning of a bunch of file names? [closed]

I have a bunch of mp3's that all have a long title, followed by "part 3" or "part 4", etc. So it's like "aasasdfjklakjsdf - part 3" and "aasasdfjklakjsdf - part 4" and "aasasdfjklakjsdf - part 5" and so on. I have over 100 of these and I would like to simply remove the "aasasdfjklakjsdf - " part fro...
Tim
1

votes
1

answer
530

views

Magento - Check if category is enabled in template file

Is there a method of checking if a certain category is enabled from within Magento template files? I only want to show a link to a specific category if it is currently enabled. Something like: if($categoryID(123)->isEnabled()){ // Do something because category ID 123 is enabled... } I need to appl...
Tim Cutting
1

votes
3

answer
1k

views

How do you use Amazon Route 53 to redirect a subdomain to a specific page?

I would like to redirect my subdomain "subdomain.example.com" to a specific page on my site "example.com/specific-page" using Amazon Route 53. Is this possible? I saw this answer and tried it (Set up DNS based URL forwarding in Amazon Route53) but that appears to only allow you to redirect to root d...
Tim Jahn
1

votes
1

answer
170

views

Perl: Delete keys in hash that don't exist as elements in array

I have an array of key names and need to remove any keys that are not in this list from a hash. I gather deleting keys in a hash is a Bad Thing while iterating over it, but it does seem to work: use strict; use warnings; use Data::Dumper; my @array=('item1', 'item3'); my %hash=(item1 => 'test 1', it...
Tim Jones
1

votes
1

answer
2.2k

views

Tweaking a photoshop smart object JavaScript

I found a JavaScript that will make every layer in Photoshop a smart object, which is awesome, but I am wondering if anyone can tweak it for me. I use this injunction with AppleScript. Due to not know much about Javascript I was hoping some kind person can tweak this to select all layers and make on...
Tim Joe
1

votes
2

answer
490

views

How to indent code in Emacs with python-mode?

I am running Emacs with python-mode.el for coding in Python. I hope to learn how to make a region of code indented well automatically. Following code is not indented well. while match != None: if match.group(1): titles.append(match.group(1)) if match.group(2): if match.group(2) != '': pns.append(int...
Tim
1

votes
1

answer
1.8k

views

How to get Boostrap popover feature on an Html ActionLink in MVC?

I have a table with ActionLinks. I am trying to figure out how to wrap these so that I can display a bootstrap popover feature. Any help is appreciated! Here is what I have before trying to make any changes to allow for Bootstrap-Popover feature: Group Name Description Last Change
Tim
-1

votes
0

answer
22

views

What's the equivalent of lfind?

I am currently using ndk16b for my android project, I need to use ndk12b for compatibility reasons. One of the methods that it's unable to find is the lfind: void* lfind(const void* __key, const void* __base, size_t* __count, size_t __size, int (*__comparator)(const void*, const void*)) __INTRODUCE...
Tim Nuwin
1

votes
1

answer
102

views

Apollo Server + Lambda + Subscriptions

Is it possible to run an Apollo GraphQL Lambda backend with subscriptions? As I understand, GraphQL subscriptions use websockets, so I suppose it won't be possible unless you use Redis as message broker but I want to validate it this as it's not stated in any part of Apollo Docs.
Tim Givois
-1

votes
1

answer
14

views

Dynamic Navigation with responsive design and pure css

I built a few websites with responsive navigation already. There are many solutions for responsive designs of website navigation if you have a static navigation. However, for my current project I am building an user-individual dynamic navigation, so the number of navigation element as well as their...
Tim Nikischin
0

votes
0

answer
2

views

Can we specify service name and transport protocol in a URL?

A URL has its own syntax. In a URL, we can specify either hostname or IP address. In a URL, we can specify port number, an can we alternatively specify service name? Can we specify transport protocol in URL? A service name may correspond to two transport protocols. For example, in /etc/services ht...
Tim
1

votes
2

answer
2.4k

views

How to bind a static member function to a boost::function using boost::bind

I want to bind a static member function to a boost::function using boost::bind. The following is an example of what I want to do (not working). class Foo { public: static void DoStuff(int param) { // To do when calling back } }; class Question { public: void Setup() { AssignCallback(boost::bind(&Foo...
Tim Ashton
0

votes
0

answer
8

views

Can I choose to manually update weights in my neural network to allow an essentially infinite batch size?

I am feeding large images into my CNN, and for some reason, converting the images to grayscale or making my network much smaller has no impact whatsoever on my maximum batch size. If I do anything more than 4, I run out of memory on my 16GB cpu. I am loading in each batch at a time, but I still run...
Tim
1

votes
2

answer
1.1k

views

AWS Cognito user pool OAuth REST API call examples exist?

It feels like amazon are encouraging people to just use their client SDK, but it would be nice to see what a sequence of valid REST calls looks like for the authorization and implicit grant flows. The AWS documentation for the authorization and token endpoints is a nice start: http://docs.aws.amazon...
Tim
1

votes
3

answer
63

views

Upgrade to Spring Boot 2.1.2 from 2.0.6 causes repository errors

I tried to upgrade a working application from Spring Boot 2.0.6 to 2.1.2. I had some troubles with tests after this change, but eventually got around that. I can successfully build the application from NetBeans (mvn clean install). However, when I try to run from a command line using mvn spring-b...
Tim
0

votes
2

answer
16

views

How to automatically insert a copied row after a specific value in a cell with VBA

I have a table that contains a set of bundles that have to be broken down into their components. For this I'm looking for VBA instructions that will copy any row that contains the tag "-edubnd" at the end of the 'sku' cell (please see table bellow for example) twice underneath itself. I have created...
Tim E
2

votes
1

answer
93

views

What is the rationale for all the different X509KeyStorageFlags?

Today, a colleague hit yet another bug related to these! I've found these flags really frustrating in past myself, because if you get them slightly wrong while instantiating X509Certificate2 objects, or exporting them, or saving them in an X509Store you can land in situations with all sorts of weird...
Tim Lovell-Smith
0

votes
0

answer
3

views

Executing Python Script in Django View [Upload CSV -> Batch Geocoding -> Show Link to Download by script generated CSV]

I found the following very useful script while Googleing: https://github.com/shanealynn/python_batch_geocode/blob/master/python_batch_geocoding.py This script is just what I need and it works flawlessly when I run it locally on my computer. I have a small Django site, where I would like to use this...
Tim
0

votes
1

answer
11

views

Unit Testing code that uses a separate AppDomain

I have code that uses an AppDomain to dynamically load plugins. I have a private internal class called PluginFinder to do the work. This all works in the production environment, but I am now trying to write MS Unit Tests for it, and I am getting an error saying the assembly could not be found. To be...
Tim
0

votes
2

answer
33

views

Improve performance of select on select query using temp table

As for Table structure, the table has weekly product prices for per country. My goal here is to select the lowest price of each product for the most recent week/year per country per product. The query below fulfills this goal, but is pretty slow performance wise. I was wondering if there is a more...
Tim
1

votes
1

answer
109

views

cabal custom build flag

Is there a way to pass a custom flag to cabal. E.g. within my .cabal file I want to write: if !external cpp-options: -DINCLUDE_EMBARGOED_IP And then from the command line something like: % cabal build -fexternal (It's fine if I have to apply the flag at configure.)
Tim
1

votes
3

answer
1.3k

views

Setup variable in mocha suite before each test?

I would like to setup some variables first, before executing the test, and I found this solution, Running Mocha setup before each suite rather than before each test But, I dont know how can I pass the variable into my callback, they way I did I will get undefined makeSuite('hello', (context) => { it...
Tim
3

votes
1

answer
27

views

Laravel Validation – Date Format m/y Not Accepting Specific Value

I've got the following validation rules for basic authentication of a Payment Method (advanced things, like CVD validation, existing card, etc. is handled afterward by Moneris). $rules = [ "type" => "required|in:visa,mastercard", "nickname" => "required", "credit_card_number" => "required|numeric|di...
Tim Lewis
1

votes
2

answer
1.1k

views

How to save a model with custom attributes that are not in the database? - Laravel 5.4

I have a situation where I have set some custom attributes on a model. These attributes don't exist in the database. When using ->isDirty() on the model I get the custom attributes that don't belong in the database. Is there some clean way to remove these attrbiutes before saving the model? $model =...
Tim van Uum
1

votes
1

answer
252

views

Measuring xcodebuild durations for all targets (including dependent ones)

Is it possible to measure time, that single xcodebuild command consumes to build every distinct target? Let's say I have a target, which depends on some cocoapods: pod1 and pod2. I build my target using xcodebuild. I can measure overall time. I need to measure times, that were separately spent on po...
Tim
0

votes
0

answer
15

views

HTML Form hidden input render function. Not rendering each hardcoded disabled=“ ”

I've made a PHP function that gets a hidden form input field. These fields have to be disabled by default. This so they won't be send when posting the form. For this I've hardcoded the disabled=" " atribute in the code. The thing is that this doesn't render on each field. How would I fix this? This...
Tim
1

votes
1

answer
2.6k

views

Setting up : Spring boot + jpa + postgresql

after searching for a long time i can't figure out how to work with spring-boot and postgresql. Spring-boot is starting without warnings. The postgres server is running, but i dont know if spring-boot can access it. Are the following files right ? pom.xml : 4.0.0 org.springframework gs-spring-boot...
Tim C.
1

votes
1

answer
630

views

CUDA build shared library

I need to create a shared library for cuda. The compilation of the library works fine but when I try to use it in my program nvcc returns a linker or ptxas error. I reduced the problem to the following code. The library must replace different C functions (here: memset). The library consists of thre...
Tim
1

votes
2

answer
283

views

Python - Networkx: Neighbours with certain weight

This question setting is python 2.7 using the package networkx: https://networkx.github.io/documentation/stable/reference/classes/generated/networkx.Graph.neighbors.html I'm looking for a way to use the function "networkx.Graph.neighbors" which returns me all the neighbors with a certain weight valu...
Tim D
1

votes
1

answer
233

views

How to throttle ngxs @Select observable

I'm building an application using ngxs as my state manager. My app displays a feed of messages which are paginated, but all messages are in the state, which are about 1000 in my case. I have a selector which paginates the posts, but when the app initialy loads, I have a hugh perfomance drain, as th...
Tim Schumacher
1

votes
2

answer
189

views

Is postgres a default and special user of PostgreSQL?

https://www.postgresql.org/docs/10/static/default-roles.html lists default roles of postgresql. But I don't find user postgres there, which has been created by default in postgresql. Is postgres a default role? Does the manual miss it or do I misunderstand? In postgresql, is postgres a special user,...
Tim
1

votes
2

answer
73

views

How to run TYPO3 functional tests with ddev?

I tried running functional tests for a TYPO3 extension inside ddev. I ran into the issue, that TYPO3 tries to create new databases for the tests but the default ddev db user named db is not allowed to create new databases. How can I get around this issue?
Tim Schreiner
1

votes
1

answer
200

views

Jest - ReferenceError: define is not defined

I'm trying to use jest to start doing some unit testing but I've come across this error that a lot of people seem to be getting but I can't seem to figure it out. Here's is what I'm trying to do (and I realize requirejs isn't supported): jest.mock("../widgets/", () => { return button; }); describe('...
Tim
0

votes
2

answer
24

views

SQL/PHP how to write WHERE which returns everything

I have a PHP-Function which selects films from a SQL-Database using a procedure with a WHERE sorting: drop procedure if exists editFilm; DELIMITER $$ CREATE PROCEDURE editFilm( IN inFilmId int, ) BEGIN SELECT * from Film where FilmId = inFilmId END $$ DELIMITER ; Now I want to have the possibility t...
Tim
1

votes
3

answer
4.8k

views

pyQT and MySQL or MSSQL Connectivity

After much study and investigation, I've decided to do my Python development with pyQT4 using Eric5 as the editor. However, I've run into a brick wall with trying to get MySQL to work. It appears that there's an issue with the QMySQL driver. From the discussions that I've seen so far, the only fi...
Tim
1

votes
1

answer
2.9k

views

jquery validator - form still getting submitted even when invalid

I have a few fields on a form with basic rules and the validator plugin does well when filling out the form itself. Submitting it, however, there is a problem because it still submits even when a valid email address hasn't been put in or before anything has been entered in other text boxes. Here's...
Tim Aych
1

votes
1

answer
1.1k

views

How can I prevent ReSharper from inserting a blank line between my MSpec fields?

When I write an MSpec context like this: [Subject(typeof(TheType), "Concern")] internal class when_this_test_is_run { Establish context = () => { // some code... }; Because of = () => Do.Something(); It should_do_this; It should_do_that; } When I let ReSharper reformat the code, it always inserts a...
Tim Long
1

votes
1

answer
660

views

Add labels to nodes in Hobbelt's “Group/Bundle Nodes” D3 force layout example?

I adapted Ger Hobbelt's excellent example of group/bundle nodes https://gist.github.com/GerHobbelt/3071239 as a JSFiddle here: https://jsfiddle.net/NovasTaylor/tco2fkad/ The display demonstrates both collapsible nodes and regions (hulls). The one tweak that eludes me is how to add labels to expanded...
Tim
1

votes
1

answer
1.7k

views

Telerik RadSplitContainer SizeInfo RelativeRatio

According to the Telerik docs, the relative size of the panels in a RadSplitContainer are set with the RelativeRatio property. I can't figure out how to use this property. I would like a left panel and a right panel, the left panel 50% of the width of the right panel. http://www.telerik.com/help/w...
Tim
1

votes
2

answer
255

views

Knockout.js - ObservableArray not returning values

In knockout, this works and binds correctly: self.currentCustomer = ko.observable(new Customer("a","b","c","d","e","f","g","h")); However, the below does not. // Random list of customers self.customers = ko.observableArray([ new Customer("a","b","c","d","e","f","g","h") ]); self.currentCustomer = ko...
Tim Ferrell

View additional