2018-10-22         Lydia

How to make the first part of the textlines unique and concatenate the second part in batch?

I have following lines in my formatliste_droid.txt:Z:\15_Testdateien\jhove_Script_fuer_MIX-Verzeichnisse\testfiles\1002779294_sf_droid_no_match.pdf$fmt/95Z:\15_Testdateien\jhove_Script_fuer_MIX-Verzeichnisse\testfiles\1002779294_sf_droid_no_match.pdf$fmt/477Z:\15_Testdateien\jhove_Script_fuer_MIX-Verzeichnisse\testfiles\1002779294_sf_droid_no_match.pdf$fmt/354The first part before $ is repeated and needs to be unique. The second part after $ is always different. So what I need is the transformation to one unique path concatenated with all second parts of the line after $Z:...

 batch-file                     1 answers                     98 view
 2018-10-22         Lydia

Firestore How to orderBy a field in another document that's referenced in my document?

In Android (Java), I am using Firebase Firestore and trying to build a simple query to get data from a collection (users) and order it by a field that's in another collection (posts). In the (users) collection I have a field contains the path to a given document in (posts) collection.users{ userID1{ name:"name" lastPost:posts/postID1 }}posts{ postID1{ text:"text" postedAt:"timeStamp here" <-(The field I want to orderBy) }} How to orderBy a filed in another document that's referenced in my document?You cannot order documents that exist within a collectio...

 java                     1 answers                     50 view
 2018-10-22         Lydia

JWT Passport Not Returning User Data From Middleware

First time questioner, long time searcher. I'm having problems getting the user object to return from a Passport JWT verification call and I'm hoping someone can help figure out what's going wrong.Here's my passport jwt configuration:import jwtSecret from './jwtConfig';const passport = require('passport'), localStrategy = require('passport-local').Strategy, User = require('../sequelize'), JWTstrategy = require('passport-jwt').Strategy, ExtractJWT = require('passport-jwt').ExtractJwt;const opts = { jwtFromRequest: ExtractJWT.fromAuthHeaderWithScheme('JWT'), sec...

 node.js                     1 answers                     90 view
 2018-10-22         Lydia

Restrict OAuth2 token to specific models/views in Django

I'm developing my first more than trivial API-interface in Django with Django Rest Framework. I'm trying to create a web service which hosts high-score tables for my games. Games will then post and retrieve their high-scores via http-requests through the API.At the moment my model structure looks something like this:Game HighscoretableHighscoreEntryNow since the service will handle scores of multiple different games, I'd like to give a separate oauth2 token for each game and restrict the api-permissions to that game. I managed to setup the oauth2 authentication with this gu...

 django                     1 answers                     24 view
 2018-10-22         Lydia

WindowsError [error 5] Access is denied

I'm using the killableprocess package (built on top of subprocess) for running processesWhenever I run the "killableprocess.Popen(command)" piece of code in my script I get the following error:File "killableprocess.py", line 157, in _execute_child winprocess.AssignProcessToJobObject(self._job, hp)File "winprocess.py", line 37, in ErrCheckBool raise WinError()WindowsError [error 5] Access is deniedException TypeError: "'NoneType' object is not callable" in <bound method AutoHANDLE.__del__ of <AutoHANDLE object at 0x025D42B0>> ignoredBut when I run it from the p...

 python                     5 answers                     68 view
 2018-10-22         Lydia

Python-Pygame sprite bounces when gravity is used

I am making a 8bit style platformer. The player falls and gains speed because of the pseudo gravity but he will fall a few pixels into the ground level. Without gravity he will land on the ground and not fall though but it is a constant fall speed.When in the ground you can go up but he will fall when you let up. He will not got down so that is not an issue for now. Any help would be appreciated.The player class/file.import pygame,sysfrom pygame.locals import *class Player: x=0 y=0 offset = 5 L=False R=False U=False D=False image = None gravity = ...

 python-3.x                     1 answers                     77 view
 2018-10-22         Lydia

Load dynamic SCSS file with Rails + Webpack

I'm using the gem rails/webpack to build the assets, but I need build a dynamic SCSS according by a brand, like://admin.scss@import 'variables-<%= 'brand-name' %>';body { background: $primary-color;}I have tried adding the loader:{ test: /\.scss(\.erb)?/, loader: 'sass-loader', options: { importExtensions: ['.scss', '.scss.erb', '.css'] }}but that didn't work.Is there a way to do something like that? Do this in a separate controller action:layout.html.erb<%= stylesheet_link_tag stylesheet_path() %>Stylesheet show controller action# Render the template to...

 ruby-on-rails                     1 answers                     43 view
 2018-10-22         Lydia

Multiple Switch thumb images

In Android, is it possible to have a Switch that can have different images set for the thumb's checked and unchecked states?For example, when a Switch is in the unchecked state, I'd like the thumb to use image_1.png and when the Switch is in the checked state, I'd like the thumb to use image_2.png.I used the following guide to set a Switch's thumb to an image, but the image applies to both the checked and unchecked states, I'd like to have a separate image for both states.Thanks! From this post, you can do something like the following:yourSwitch.setOnCheckedChangeListene...

 android                     1 answers                     74 view
 2018-10-22         Lydia

Remove a specific character from string where the character exists multiple times

I have a customer reference that we use internally to identify a customer when processing certain jobs. It's made up of the surname, the postcode with a hyphen instead of a space and then the date of birth in DATE format so for example;JonesM11-1BD1978-05-05I need to remove that hyphen from the postcode as we don't want it hyphenated going forward so the existing data that exists this way needs correcting to match.I can't quite get my head around how to just pluck out the first of three of the same character/symbol from a string without affecting the others. Just use CHA...

 sql                     3 answers                     38 view
 2018-10-22         Lydia

help with simple query

My config table:name | value--------+------version | 1.5.6title | testHow I try and get it:$getCfg = mysql_query("SELECT * FROM config");$config = mysql_fetch_assoc($getCfg);echo $config['title'];Equals to:Notice: Undefined index: title in C:\web\index.php on line 5How would I get the value where the name is title?The above doesn't work..well if I add WHERE title = 'test' and then echo $config['title'] $getCfg = mysql_query("SELECT * FROM config");$config = array();while ($row = mysql_fetch_assoc($getCfg)) { $config[$row['name']] = $row['value'];}echo $config['titl...

 php                     4 answers                     58 view
 2018-10-22         Lydia

How to include TouchableOpacity within Text ReactNative

Hi I want to wrap TouchableOpacity within a Text as I want to make some of the text clickable. When I wrap everything within a Text it looks perfect and that is how I want it to look. <Text style={{color: colors.black, fontSize: 12, fontWeight: 'normal', marginTop: 10, lineHeight: 18}}> {strings.loginPrivacyTermsCondOne} <Text style={{color: colors.primaryColor, fontSize: 12, fontWeight: 'normal',}}> {strings.loginPrivacyTermsCondTwo} </Text> ...

 reactjs                     1 answers                     1 view
 2018-10-22         Lydia

SQL Server 2008: Share data between Compact 3.5 and Express

Question: How can we connect a SQL Server CE DB to a SQL Server Express DB? We can't use Merge replication because you can only be a Subscriber in SQL Server Express, not a Publisher.More background information:We have an application structured as follows:1) Our headquarters, running SQL Server 20082) Branches, running SQL Server 2008 Express3) Machines, running SQL Server CompactEach machine needs to connect to its branch to send data. Then the branch needs to connect to our headquarters to send the data. The synchronization of data between the machines and branches sho...

 sql-server-2008                     2 answers                     15 view
 2018-10-22         Lydia

PyQt4 QDialog connections not being made

I am working on an application using PyQt4 and the designer it provides. I have a main window application that works fine, but I wanted to create custom message dialogs. I designed a dialog and set up some custom signal/slot connections in the __init__ method and wrote an if __name__=='__main__': and had a test. The custom slots work fine. However, when I create an instance of my dialog from my main window application, none of the buttons work. Here is my dialog:from PyQt4.QtGui import *from PyQt4.QtCore import *import sysimport encode_dialog_ui# Ui_EncodeDialog is the...

 python                     1 answers                     43 view
 2018-10-22         Lydia

Unable to Connect to Azure from Mac

I see Connect-AzureRmAccount command under AzureRM.Profile:Get-Command -Module AzureRM.Profile* CommandType Name VersionCmdlet Connect-AzureRmAccount 0.13.1But when I run it, get following error: Connect-AzureRmAccount : The term 'Connect-AzureRmAccount' is not recognized as the name of a cmdlet, function, script file, or operable program.Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1+ Connect-AzureRmAccount+ ~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : ObjectNotFound: (Co...

 macos                     1 answers                     34 view
 2018-10-22         Lydia

Issue on Azure DocumentDB and Hive integrations on HDInsight using Microsoft Hive ODBC driver

Could anyone please tell me if this is a known bug of Microsoft Hive ODBC driver? Additional information: ERROR [HY000] [Microsoft][HiveODBC] (35) Error from Hive: error code: '40000' error message: 'Error while compiling statement: FAILED: RuntimeException MetaException(message:java.lang.ClassNotFoundException Class com.microsoft.azure.documentdb.hive.DocumentDBSerDe not found)'.I'm getting this error when performing a SELECT queries against hive external tables that points to documentdb collections.Much appreciated for any help. You may need to copy the JAR depende...

 azure                     1 answers                     34 view
 2018-10-22         Lydia

Problem with update Android SDK API 28 inside Android Studio

I want to update my Android API SDK 28 from Studio's SDK Manager . Inside the tab "SDK Platforms" I can check every Android API to instal except the first Android API 28. Can anybody explain me why it's happening? Try by checking the "Show Package Details" checkbox which is to the bottom-right side of the screenshot that you have provided. You will be able to see individual packages, see if you are able to download them. [XXX]

 android                     1 answers                     37 view

Page 1 of 147  |  Show More Pages:  Top Prev Next Last