instruction
stringlengths
0
30k
null
Whenever I use the cropping tool in GIMP, I must zoom in to the cropped image manually afterwards and center it. Is there an option that GIMP will automatically zoom to the cropped content? thanks, Sina tried youtube tutorials, but found nothing there...
how to automatically zoom to cropped image in GIMP
|gimp|
null
There will be many options, like using std::remove_if, or in this example std::copy_if #include <string> #include <array> #include <algorithm> #include <iostream> std::string without_duplicates(const std::string& input) { std::array<bool,256ul> seen{}; // initialize all "seen" characters to false std::string output; // std::back_inserter allows you to copy to an "empty" collection by adding elements at the end // copy_if takes a lambda expression which will be called for each character in the input string. std::copy_if(input.begin(),input.end(),std::back_inserter<std::string>(output),[&](const char c) { bool copy_to_output_string = !seen[c]; seen[c] = true; return copy_to_output_string; }); return output; } int main() { auto result = without_duplicates("geEksforGEeks"); std::cout << result; }
I am trying to connect in a Postgres database from an android java app. I am getting this exception: ``` org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception. at org.postgresql.Driver.connect(Driver.java:281) at java.sql.DriverManager.getConnection(DriverManager.java:580) at java.sql.DriverManager.getConnection(DriverManager.java:218) at com.example.dbtestapp.DatabaseHelper.getConnection(DatabaseHelper.java:19) at com.example.dbtestapp.MainActivity.onCreate(MainActivity.java:25) at android.app.Activity.performCreate(Activity.java:7994) at android.app.Activity.performCreate(Activity.java:7978) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) ``` The code of connection class: ``` public class DatabaseHelper { private static String URL = "jdbc:postgresql://10.0.2.2:5432/postgres"; private static String USER = "postgres"; private static String PASSWORD = "1111"; public static Connection getConnection() throws SQLException { return DriverManager.getConnection(URL, USER, PASSWORD); } } ``` And the main class code: ``` public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView text = findViewById(R.id.text); Connection connection = null; try { connection = DatabaseHelper.getConnection(); text.setText("good"); } catch (SQLException e) { text.setText("BAAAAAAAAAAAAAAD"); System.out.println(e.getMessage()); e.printStackTrace(); } } } ``` While I was trying to fix it, the following was done: 1. Checked and added user-permisions: ``` <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> ``` 2. Edited pg_hba.conf, added two connections: ``` # IPv4 local connections: host all all 127.0.0.1/32 scram-sha-256 host all all 192.168.1.68/32 trust host all all 0.0.0.0/0 md5 ``` 3. Turn off Firewall Windows in all three network types. 4. Checked project proxy settings (set on "no proxy", connected succesfull) 5. Tried all of Ipv4-addresses i got in ipconfig (bc hope is leaving me), and 192.168.1.68 from pg_hba.conf 6. Added 2 rules (TCP and UDP protocols) for 5432 port Still doesn't work.. I also have run only java code in Intellij and got the connection and data from my db. I also have internet connection on emulated device
Connecting to local database from Android studio emulator
|android|postgresql|jdbc|android-emulator|database-connection|
null
Might be late to the party, but progressive commits seems very appropriate for this exact issue. You can read a bit about it on this git repo [here][1] [1]: https://github.com/momocow/semantic-release-gitmoji
The default behavior for for pressing the tab key is to more to the next focusable HTML element. In the case of the code: ```javascript if (document.activeElement === lastFocusableLm) { firstFocusableLm.focus(); e.preventDefault(); } ``` If the new/next focusable element is the `lastFocusableLm` the focus will change to the `firstFocusableLm`. If you leave out `e.preventDefault();` the default behaviur will be applide -- that is, moving focus to the next element -- then that is the element after `firstFocusableLm`. That is why it looks like, it is ignoring the `firstFocusableLm` aka. the close button. It just jumps twice. Calling `e.preventDefault();` will stop the keyup event and therefore it will not continue with the action of focusing the next element.
|google-sheets|google-sheets-formula|
{"OriginalQuestionIds":[13435959],"Voters":[{"Id":3702797,"DisplayName":"Kaiido","BindingReason":{"GoldTagBadge":"canvas"}}]}
|php|wordpress|http-redirect|
null
**server.go** package main import ( "context" mathservices "service/mathservices" "github.com/smallnest/rpcx/server" ) func main() { s := server.NewServer() s.RegisterName("MathService", new(mathService.MathService), "") s.Serve("tcp", ":8972") } **math_service.go** package mathservices import ( "context" "fmt" ) type Args struct { A int B int } type Reply struct { C int } type MathService int func (t *MathService) Mul(ctx context.Context, args *Args, reply *Reply) error { reply.C = args.A * args.B return nil } given this go microservice made with rpcx framework i want it to communicate with nest js microservice, here is the code of the nest js microservice: **nestmicroservice/src/appmodule.ts** import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { ClientsModule, Transport } from '@nestjs/microservices'; @Module({ imports: [ ClientsModule.register([ { name: 'MathService', transport: Transport.TCP, options: { host: 'localhost', port: 8972, }, }, ]), ], controllers: [AppController], providers: [AppService], }) export class AppModule {} **nestmicroservice/src/appcontroller.ts** import { Controller, Inject } from '@nestjs/common'; import { ClientProxy, EventPattern, MessagePattern, } from '@nestjs/microservices'; import { Observable } from 'rxjs'; @Controller() export class AppController { constructor( @Inject('MathService') private client: ClientProxy, ) {} multiply(): Observable<any> { { console.log('first line run'); const pattern = { cmd: 'Mul' }; return this.client.send<any>(pattern, {a:10, b:5}); } } } first line run gets printed in the console but the code **return this.client.send<any>(pattern, {a:10, b:5});** produces error please guys help me!
MongoDB - $lookup not getting an appropriate result
|node.js|mongodb|mongodb-query|lookup|
|node.js|next.js|pnpm|node-fetch|ky|
|reactjs|node.js|axios|ky|
I am using React and express together for my web application where in express will serve static files of react build. My Requirement is to pass the environment specific react urls at the time of deployment. So for this I have created a `.env.template` file where I have a template like below ``` REACT_APP_PRIORITY_DATASET_LAST_X_DAYS=<%REACT_APP_PRIORITY_DATASET_LAST_X_DAYS%> REACT_APP_PRIORITY_ISSUE_ROWS_NO=<%REACT_APP_PRIORITY_ISSUE_ROWS_NO%> REACT_APP_STUDYDATASET_API_ENDPOINT=<%REACT_APP_STUDYDATASET_API_ENDPOINT%> REACT_APP_ASSIGNED_STUDIES_API_ENDPOINT=<%REACT_APP_ASSIGNED_STUDIES_API_ENDPOINT%> ``` So my build command would be "build": "env-cmd -f .env.template react-scripts --max_old_space_size=4096 build", So once build is created, it will have reference of template. Now I want to replace the keys with actual values based on my env. So Apporach is inside my `server/.env` file keeping key with actual values. Now In `server/app.js` Before serving the build, I am writing a function to replace the content using replace-in file package. Any help would be appreciated Code snippet is below ``` function getReactEnvVariable() { console.info('object', Object.entries(process.env)); return Object.entries(process.env).reduce( (accumulator, [key, value]) => { if (key.startsWith('REACT_APP')) { accumulator.from.push( new RegExp(`<%[ ]{0,}${key.trim()}[ ]{0,}%>`, 'gi') ); accumulator.to.push(value.trim()); } return accumulator; }, {from: [], to: []} ); } function replaceValueWithEnvSync() { const REACT_APP_ENVIRONMENTAL_VARIABLE = getReactEnvVariable(); console.log( 'REACT_APP_ENVIRONMENTAL_VARIABLE', REACT_APP_ENVIRONMENTAL_VARIABLE ); try { return replace.sync({ files: '../build/static/js/*.js', from: REACT_APP_ENVIRONMENTAL_VARIABLE.from, to: REACT_APP_ENVIRONMENTAL_VARIABLE.to, countMatches: true, }); } catch (e) { console.log('@@@@@@@@@@@@@@@@@@error', e); return []; } } const file = replaceValueWithEnvSync(); // add middlewares app.use(express.static(path.join(__dirname, '..', 'build'))); app.use(express.static('public')); app.use((req, res) => { res.sendFile(path.join(__dirname, '..', 'build', 'index.html')); }); ``` so with this logic my build folder static files gets updated. and restarted my node server locally. It worked fine. But the same code when we are deploying to linux remote server, its not replacing. On linux we have pm2 installed which restarted the server once the deployment is completed.
Replace React Variables in build folder before serving the build by express Server
|javascript|reactjs|node.js|express|gitlab|
null
I would like to create an app in android studio using kotlin. In one of my activities there is a background image (blue) and a circle image (red). I want the background to stretch to screen sizes of different devices. (see image below) This means the circle sometimes gets smaller relative to the background. Is there a way to adjust the circle size automatically and to keep it centered? As you see I tried with android:background="@drawable/background" and was also playing around with android:scaleType="fitXY" But it didnt work out. Any help is greatly appreciated! Thank you. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background" tools:context=".MainActivity"> <ImageView android:id="@+id/background" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/background" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" android:layout_marginStart="100dp" android:layout_marginTop="200dp"/> <ImageView android:id="@+id/circle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/circle" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" android:layout_marginStart="100dp" android:layout_marginTop="200dp"/> </androidx.constraintlayout.widget.ConstraintLayout> [![enter image description here][1]][1] I added the two images for testing: [![enter image description here][2]][2] [![enter image description here][3]][3] [1]: https://i.stack.imgur.com/zZXfi.png [2]: https://i.stack.imgur.com/8Cuwb.png [3]: https://i.stack.imgur.com/YH8p9.png
How to properly stretch /anchor two images in a kotlin app (android)
|android|kotlin|android-studio|image-scaling|
If you use a **FlatList** you can use the prop `contentContainerStyle` to achieve it by adding a `flexDirection` to "row" and a `flexWrap` to "wrap". <FlatList contentContainerStyle={{flexDirection : "row", flexWrap : "wrap"}} data={...} renderItem{...} />
|php|wordpress|
null
Angular 17.1 introduced new Router [info][1] parameter to `NavigationExtras`: .html: <button routerLink="home" [info]="{ hello: 'world' }"> Home </button> .ts: this.router.navigateByUrl('home', { info: { hello: 'world' } }); It's similar to state option, but it has two main differences. It's not saved in navigation history (`history.state`). And object is not copied or cloned, but assigned directly to the Router's current `Navigation`. [1]: https://angular.io/api/router/NavigationBehaviorOptions#info
{"Voters":[{"Id":1197518,"DisplayName":"Steve"},{"Id":12860,"DisplayName":"Burkhard"},{"Id":70345,"DisplayName":"Ian Kemp"}],"SiteSpecificCloseReasonIds":[11]}
"How can I ensure that the decoded data I receive on my mobile matches the data shown on the ESP32 console when connecting the ESP32 to my mobile?"
Need the decoded data while from server esp32 send and Receiving in react native cli
|react-native|bluetooth-lowenergy|esp32|arduino-esp32|react-native-ble-plx|
Tengo este problema que no se resuelve la importación de minero, que es código propio y su modulo correspondiente en Go. ``` import ( "fmt" "time" "github.com/JonathanDiz/blockchain-miner/pkg/minero" // Importa el paquete minería utilizando la convención de importación de módulos de Go ) ``` could not import github.com/JonathanDiz/blockchain-miner/pkg/minero (no required module provides package "github.com/JonathanDiz/blockchain-miner/pkg/minero")compilerBrokenImport Subí mi proyecto a GitHub y sigue el mismo error. Como lo soluciono? Tengo problemas al importar modulo en Go
importar modulo en Go
|go|
null
I find out the answer. Below you can see what I need: @Library("cnv-jenkins-sharedlib") _ pipeline { agent { label 'cnv-jobs' } options { timestamps () disableConcurrentBuilds() } tools { maven 'Maven_3.9.2' jdk 'JDK11' } parameters { choice(name: 'StageName', choices: ['test', 'dev' ], description: 'Choice stage') booleanParam(name: 'deploy', defaultValue: false, description: 'Deploy to k8s') } environment { registryUrl = 'cprd-doc-reg01.example.com:10012' DOCKER_CREDS = credentials('cnv_docker_reg_creds') ENV = "${params.StageName}" DEPLOY_BRANCH = "feature/CNVPRD-2475/osago_16_model" PROJECT_NAME = "background-osago-tarifficaiton-service" } stages { stage('Checkout SCM') { steps { script { checkout([$class: 'GitSCM', branches: [[name: "${env.DEPLOY_BRANCH}" ]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'bitbucket_cnv_ssh', url: "ssh://git@cprd-bbkt-app02.example.com:7999/conv/tariffication-service.git"]]]) def scmVars = checkout([$class: 'GitSCM', branches: [[name: "${DEPLOY_BRANCH}"]], userRemoteConfigs: [[url: 'https://github.com/jenkinsci/git-plugin.git']]]) GIT_HASH = scmVars.GIT_COMMIT.take(7) GIT_BRANCH = scmVars.GIT_BRANCH script{ sh "ls -lat" } } } } stage('prepare Environment'){ steps { sh "echo Git Branch is: ${GIT_BRANCH}" GetBuildVersion() } } stage('Build and Sonar Scanner') { steps { sh "ls -la" MvnBuild(registryUrl: "${registryUrl}", imageName: "cnv-${PROJECT_NAME}", imageTag: "build-${GIT_HASH}", PROFILE: "${ENV}stand") } } stage('Build image'){ steps { cnvDockerBuild(dockerFile: "src/main/docker/Dockerfile.jvm", registryUrl: "${registryUrl}", imageName: "cnv-${PROJECT_NAME}", imageTag: "build-${GIT_HASH}") } } stage("Deploy to K8S") { when { expression { params.deploy } } steps { CnvDeployK8S(imageTag: "build-${GIT_HASH}") } } } }
Not `state = {suggestionsList: this.props, searchInput: ''}`. You should use `state = {suggestionsList: this.props.suggestionsList, searchInput: ''}` And You can use `onChange={this.showoptions}` for searchEngine not `onClick={this.showoptions}` Here is right `GoogleSuggestions.js` File ``` // Write your code here import {Component} from 'react' import SuggestionItem from './SuggestionItem' class GoogleSuggestions extends Component { state = {suggestionsList: this.props.suggestionsList, searchInput: ''} showoptions = event => { this.setState({searchInput: event.target.value}) } render() { const {suggestionsList, searchInput} = this.state console.log(suggestionsList); console.log(typeof suggestionsList) return ( <div className="bg-container"> <img className="googleLogo" src="https://assets.ccbp.in/frontend/react-js/google-logo.png" alt="google logo" /> <div className="input-container"> <div> <img className="search-icon" src="https://assets.ccbp.in/frontend/react-js/google-search-icon.png" alt="search icon" /> <input type="search" value={searchInput} onClick={this.showoptions} className="input" placeholder="Search Google" /> </div> <ul className="ul-cont"> {suggestionsList.map(eachItem => ( <SuggestionItem itemDetails={eachItem} key={eachItem.id} /> ))} </ul> </div> </div> ) } } export default GoogleSuggestions // Write your code here import {Component} from 'react' import SuggestionItem from './SuggestionItem' class GoogleSuggestions extends Component { state = {suggestionsList: this.props.suggestionsList, searchInput: ''} showoptions = event => { this.setState({searchInput: event.target.value}) console.log(this.state.searchInput); } render() { const {suggestionsList, searchInput} = this.state; return ( <div className="bg-container"> <img className="googleLogo" src="https://assets.ccbp.in/frontend/react-js/google-logo.png" alt="google logo" /> <div className="input-container"> <div> <img className="search-icon" src="https://assets.ccbp.in/frontend/react-js/google-search-icon.png" alt="search icon" /> <input type="search" value={searchInput} onChange={this.showoptions} className="input" placeholder="Search Google" /> </div> <ul className="ul-cont"> {suggestionsList.map(eachItem => ( eachItem.suggestion.indexOf(searchInput) ? "":<SuggestionItem itemDetails={eachItem} key={eachItem.id} /> ))} </ul> </div> </div> ) } } export default GoogleSuggestions ```
|php|drupal|drupal-7|roles|drupal-modules|
null
|python|opencv|ocr|crop|
|python|x11|mininet|xterm|
You may have forgotten to publish your assets. If you don't publish your assets, they won't show up even when embedded within a `RichText`.
I am using ROS Melodic and a Scout model with a Velodyne VLP-16 mounted on it. I am also using lidar odometry. However, when I display the robot model on RViz, the robot does not move and remains stationary, but the odometry continues to rotate. What could be the cause of this error and how can it be resolved? Here Thank you. This is the code that I changed of scout_mini.urdf.xacro to mout velodyne on the top. ``` <?xml version="1.0"?> <robot name="scout_mini" xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:arg name="robot_namespace" default="/" /> <xacro:arg name="urdf_extras" default="empty.urdf" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_1.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_2.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_3.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_4.xacro" /> <!-- Variables --> <xacro:property name="M_PI" value="3.14159"/> <!-- Vehicle Geometries --> <xacro:property name="base_x_size" value="0.514618" /> <xacro:property name="base_y_size" value="0.3816" /> <xacro:property name="base_z_size" value="0.10357" /> <xacro:property name="wheelbase" value="0.463951"/> <xacro:property name="track" value="0.416503"/> <xacro:property name="wheel_vertical_offset" value="-0.100998" /> <!-- <xacro:property name="track" value="0.3426" /> <xacro:property name="wheelbase" value="0.3181"/> <xacro:property name="wheel_vertical_offset" value="-0.160000047342231" />--> <xacro:property name="wheel_length" value="0.08" /> <xacro:property name="wheel_radius" value="0.08" /> <!-- Base link --> <link name="base_link"> <visual> <origin xyz="0 0 0.0" rpy="1.57 0 -1.57" /> <geometry> <mesh filename="package://scout_description/meshes/scout_mini_base_link2.dae" /> </geometry> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <!--<mesh filename="package://scout_description/meshes/scout_mini_base_link2.dae" />--> <box size="${base_x_size} ${base_y_size} ${base_z_size}"/> </geometry> </collision> </link> <!-- <joint name="chassis_link_joint" type="fixed"> <origin xyz="0 0 ${wheel_radius - wheel_vertical_offset}" rpy="0 0 0" /> <parent link="base_link" /> <child link="chassis_link" /> </joint> --> <link name="inertial_link"> <inertial> <mass value="60" /> <origin xyz="0.0 0.0 0.0" /> <inertia ixx="2.288641" ixy="0" ixz="0" iyy="5.103976" iyz="0" izz="3.431465" /> </inertial> </link> <joint name="inertial_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 0" /> <parent link="base_link" /> <child link="inertial_link" /> </joint> <!-- For testing, hang the robot up in the air --> <!-- <link name="world" /> <joint name="world_to_base_link=" type="fixed"> <origin xyz="0 0 0.5" rpy="0 0 0" /> <parent link="world"/> <child link="base_link"/> </joint> --> <!-- Scout wheel macros --> <!-- wheel labeled from 0 to 3, conter-clockwise, starting from front right wheel --> <!-- motor 1 and 2 (left side) are mechanically installed in a reversed direction --> <xacro:scout_mini_wheel_1 wheel_prefix="front_left"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${wheelbase/2} ${track/2} ${wheel_vertical_offset}" rpy="-1.57 0 0" /> </xacro:scout_mini_wheel_1> <xacro:scout_mini_wheel_2 wheel_prefix="rear_left"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${-wheelbase/2} ${track/2} ${wheel_vertical_offset}" rpy="-1.57 0 0" /> </xacro:scout_mini_wheel_2> <xacro:scout_mini_wheel_3 wheel_prefix="front_right"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${wheelbase/2} ${-track/2} ${wheel_vertical_offset+0.001}" rpy="1.57 0 0" /> </xacro:scout_mini_wheel_3> <xacro:scout_mini_wheel_4 wheel_prefix="rear_right"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${-wheelbase/2} ${-track/2} ${wheel_vertical_offset+0.001}" rpy="1.57 0 0" /> </xacro:scout_mini_wheel_4> <!-- Additional definitions --> <xacro:include filename="$(arg urdf_extras)" /> <!-- Gazebo definitions --> <xacro:include filename="$(find scout_description)/urdf/scout_mini.gazebo" /> </robot> ```
(ros melodic) Lidar odometry is not working well
|navigation|ros|sensors|rviz|odometry|
null
Multi level project reference using dll
On Windows: 1. Move the `dracula.xml` file to `C:\Users\yourUsername\AppData\Roaming\QtProject\qtcreator\styles`. 2. Move the `drakula.creatortheme` file to `C:\Users\yourUsername\AppData\Roaming\QtProject\qtcreator\themes`. 3. Go to *Qt Creator -> <kbd>Edit</kbd> -> <kbd>Preferences</kbd>*, click the <kbd>Environment</kbd> tab, and select <kbd>Drakula</kbd> in the <kbd>Theme</kbd>. Then click <kbd>Restart Now</kbd> in the dialog that will pop up. 4. Go to *Qt Creator -> <kbd>Edit</kbd> -> <kbd>Preferences</kbd>*, click the <kbd>Text Editor</kbd> tab, and select <kbd>Dracula</kbd> in the <kbd>Color Scheme</kbd>. Step 4 is not necessary, Qt Creator will automatically change the text editor's color scheme if it detects it's available. **Note:** There are no `styles` and `themes` folders by default, they must be created. [![][1]][1] [1]: https://i.stack.imgur.com/HeVOF.gif
Hello awesome developers! As you can see, I'd like to ensure my application starts when the phone boots up. Everything else is functioning correctly; I receive toasts and background processes are working. However, my application fails to run. What could be the issue, and how can I fix it? Thank you. ``` class BootCompleteReceiver : BroadcastReceiver() { @RequiresApi(Build.VERSION_CODES.O) override fun onReceive(context: Context?, intent: Intent?) { if (intent?.action == Intent.ACTION_BOOT_COMPLETED) { Toast.makeText(context, "Boot Completed", Toast.LENGTH_LONG).show() val mainIntent = Intent(context, MainActivity::class.java) mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) context?.startActivity(mainIntent) } } } ``` ``` <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <receiver android:name=".BootCompleteReceiver" android:exported="false" android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> ``` ``` class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { AutoBootTheme { // A surface container using the 'background' color from the theme Surface( modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background ) { Greeting("Android") } } } } } @Composable fun Greeting(name: String, modifier: Modifier = Modifier) { Text( text = "Hello $name!", modifier = modifier ) } @Preview(showBackground = true) @Composable fun GreetingPreview() { AutoBootTheme { Greeting("Android") } } ```
|php|woocommerce|categories|
null
It's often needed to patch and compile a HTML (in my case a SVG) returned from a backend. I used only the simplest version as ``` import {compile} from 'vue'; const component = compile(text); ``` But now I patch the source with DOM and inject other components inside it. For that I need to use `app.component()` to register all the injected components. That's bad obviously for several known reasons. Could we inject locally imported components? Like: ``` import Tooltip from 'Tooltip.vue'; import {compile} from 'vue'; const component = compile(text, {components:[Tooltip]}); ``` Definitely `compile` has an extensive set of options: https://github.com/vuejs/core/blob/fef2acb2049fce3407dff17fe8af1836b97dfd73/packages/compiler-core/src/options.ts But I can't find anything about injecting components. There are several ideas but need prolonged tries and errors like: 1. Compile as SFC and inject dependencies somehow 1. Provide components in `ctx` somehow on a render 1. Somehow do it with `defineComponent` But I can't figure a proper direction to follow, any help would be appreciated. The only working way I've found so far is with `<component>` but I'd like to use component names directly as tags: ``` <script setup> import { compile, h } from 'vue' const comp = compile('<component :is="test"></component>'); const test = () => h('div', 'TEST'); </script> <template> <comp :test/> </template> ```
I have searched in google with your error message and got it . ***[see here][1]*** [1]: https://stackoverflow.com/questions/75767564/usr-bin-node-1-syntax-error-unexpected
Your code invoked undefined behaviour as you pass the pointer not the integer to the `printf`. `%d` is expecting `int`. You need to dereference `x` and `y` ``` void swap(int* x, int* y) { int temp; temp = *x; *x = *y; *y = temp; printf("The value of x and y inside the function is x = %d and y = %d", *x, *y); } ```
|terminal|tmux|terminfo|
creating web app using dotnet 6 which should be using win auth. I have managed to run it locally on IIS Express by setting this [enter image description here](https://i.stack.imgur.com/jaQCj.png) in the launchSettings.json I have followed this https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/authentication/windowsauthentication/ to enable windows authentication on the server IIS. Now, when I enter the web url its asking for credentials. [enter image description here](https://i.stack.imgur.com/FfZU1.png) And here comes the issue. Its asking for email as username. But on the server where the IIS is running, my windows account does not have any email set up. Just username. I am using the username/password to connect via Remote Desktop. But here the credentials does not work. When I enter them, the login screen re-appear again, and again. Any idea where I have made mistake? I was trying to go over the setting of my windows account on the server, I have also tried it from different computer and still the same result.
Cannot authenticate to IIS using win auth and dotnet 6
|.net|iis|windows-authentication|
null
With XSLT 3, as supported by current versions of SaxonJS (2.6 is the current version) or Saxon Java, SaxonC, Saxon .NET or SaxonCS, you can process JSON input (on the command line with option `-json`) and produce JSON output (with XDM maps and arrays being serialized with output method json): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:map="http://www.w3.org/2005/xpath-functions/map" exclude-result-prefixes="#all" version="3.0"> <xsl:output method="json" indent="yes"/> <xsl:template match="."> <xsl:sequence select="map { 'gp_number' : ?gp_number, 'lineLevel' : array { ?lineLevel?* ! map:put(., 'Amount', xs:decimal(?Qty) * xs:decimal(?Rate)) }, 'Total_Amount' : sum(?lineLevel?*!(xs:decimal(?Qty) * xs:decimal(?Rate))) }"/> </xsl:template> </xsl:stylesheet> [Example fiddle using SaxonJS 2][1]. [1]: https://martin-honnen.github.io/xslt3fiddle/?xslt=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Cxsl%3Astylesheet%20xmlns%3Axsl%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2FXSL%2FTransform%22%0D%0A%20%20%20%20xmlns%3Axs%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%0D%0A%20%20%20%20xmlns%3Amap%3D%22http%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%2Fmap%22%0D%0A%20%20%20%20exclude-result-prefixes%3D%22%23all%22%0D%0A%20%20%20%20version%3D%223.0%22%3E%0D%0A%20%20%20%20%0D%0A%20%20%20%20%3Cxsl%3Aoutput%20method%3D%22json%22%20indent%3D%22yes%22%2F%3E%0D%0A%20%20%20%0D%0A%20%20%20%20%3Cxsl%3Atemplate%20match%3D%22.%22%3E%0D%0A%20%20%20%20%20%20%3Cxsl%3Asequence%20%0D%0A%20%20%20%20%20%20%20%20select%3D%22map%20%7B%20%27gp_number%27%20%3A%20%3Fgp_number%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27lineLevel%27%20%3A%20array%20%7B%20%3FlineLevel%3F*%20%21%20map%3Aput%28.%2C%20%27Amount%27%2C%20xs%3Adecimal%28%3FQty%29%20*%20xs%3Adecimal%28%3FRate%29%29%20%7D%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%27Total_Amount%27%20%3A%20sum%28%3FlineLevel%3F*%21%28xs%3Adecimal%28%3FQty%29%20*%20xs%3Adecimal%28%3FRate%29%29%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%22%2F%3E%0D%0A%20%20%20%20%3C%2Fxsl%3Atemplate%3E%0D%0A%20%20%20%20%0D%0A%3C%2Fxsl%3Astylesheet%3E&input=%7B%0D%0A%20%20%22gp_number%22%20%3A%20%2256826526%22%2C%0D%0A%20%20%22lineLevel%22%20%3A%20%5B%20%7B%0D%0A%20%20%20%20%22Qty%22%20%3A%20%224.00%22%2C%0D%0A%20%20%20%20%22Rate%22%20%3A%20%2250.00%22%0D%0A%20%20%7D%2C%20%7B%0D%0A%20%20%20%20%22Qty%22%20%3A%20%223.00%22%2C%0D%0A%20%20%20%20%22Rate%22%20%3A%20%2225.00%22%0D%0A%20%20%7D%20%5D%0D%0A%7D&input-type=JSON
|php|wordpress|woocommerce|checkout|orders|
null
**Problem :-** You import like below. ```python from django.contrib.auth import authenticate, login ``` And then you use it as below. ```python user = authenticate(request, username=student_id, password=password) #and login(request, user) ``` Which are built in methods. This `authenticate` function doesn't use your password field in your model.(unless you already wrote code for custom authentication backend and didn't post here.) So, when you try to log in, that user doesn't exist in django built-in auth system. **Answers :-** 1) I suggest you to use django built-in auth system. Django already include built-in auth system, which you can customise for your needs. 2) Write a custom authentication backend. It's not very hard to make a custom authentication backend. It's the only way to make this work, if you want to keep using custom password fields in models.
**Context:** I'm developing audio app on Node.js for RPI on Rapsberry PI OS Lite (Debian, no GUI), and I need the way of playing mp3 files in the Node.js env from https with the ability to pause/resume the playback. I need this to be working on Mac M1 (dev/debug) and on the RPI. Surprisingly for me, I didn't find any working audio player for mac/linux that would solve this out of the box (spent a few hours searching and trying different options). **Possible solution** I am trying to implement the playback with the following approach: mp3 -> PCM stream -> speaker, that looks relatively straight-forward, smth like this: ``` import https from "https"; import prism from "prism-media"; import Speaker from "speaker"; decoder = new prism.FFmpeg({...}); speaker = new Speaker({...}); play(url) { this.stream = https.get(url, (response) => { response.pipe(this.decoder).pipe(this.speaker); }); } pause() { this.decoder.unpipe(this.speaker); } resume() { this.decoder.pipe(this.speaker); } ``` **The problem** The *speaker* package [fails to install](https://github.com/TooTallNate/node-speaker/issues/83) on Mac M1 with Node v21.7. Then I found [this fork](https://www.npmjs.com/package/speaker-arm64) of the [arm64 support](https://github.com/TooTallNate/node-speaker/pull/109#issuecomment-658658406), which also fails to install with: ``` ... npm ERR! ../deps/mpg123/src/mpg123app.h:14:10: fatal error: 'config.h' file not found ... ``` Then I found the audio-speaker package that looks promissing, but it also fails on initialisation [with this](https://github.com/audiojs/audio-speaker/issues/63). I don't give it up, but I am afraid I am running out of options I can come up with on my own. I would appreciate any feedback.
When I login to bastion server every time, there is initial shell script which will run and records sessions. ``` if [[ -z $SSH_ORIGINAL_COMMAND ]]; then LOG_FILE="`date --date="today" "+%Y-%m-%d_%H-%M-%S"`_`whoami`" LOG_DIR="/var/log/ssh-bastion/" echo "" echo "NOTE: This SSH session will be recorded" echo "AUDIT KEY: $LOG_FILE" echo "" # suffix the log file name with a random string. SUFFIX=`mktemp -u _XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` script -qf --timing=$LOG_DIR$LOG_FILE$SUFFIX.time $LOG_DIR$LOG_FILE$SUFFIX.data --command=/bin/bash else echo "This bastion supports interactive sessions only. Do not supply a command" exit 1 fi ``` Now when I try to login its giving below error >script: cannot open /var/log/ssh-bastion/2024-03-29_06-52-11_username_m8hI1GxwGYd5847vhanBcn9Www1Koq8X.data: Permission denied It was working well earlier and I have been facing this issue since 2 days. All my directory permissions are same and there is no change in any file/directory permissions.
I am using dataTables and it is working properly no until i inlclude fullcalendar my dataTable suddenly didnt work and i found out that adding the fullcalendar scripts makes it somehow disabled here is my scripts <!-- dataTables --> <script src="https://code.jquery.com/jquery-3.7.0.js"></script> <script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap5.min.js"></script> <!-- Fullcalendar --> <script src="vendor/fullcalendar/lib/jquery.min.js"></script> <script src="vendor/fullcalendar/lib/moment.min.js"></script> <script src="vendor/fullcalendar/fullcalendar.min.js"></script> because both of them uses jquery.min.js i tried to use the same jquery on them the latest one but it didnt work. Does anybody know how to fix this thanks a lot.
These are challenging to implement, and unfortunately the `mgcv` documentation doesn't make it easy to learn how to do them. As teh response above suggests, ff you look at the help for linear functionals (`?mgcv::linear.functional.terms` and `?mgcv::gam.models`), you will see that the `by` variable is used as a weighting matrix, and the resulting smooth is constructed as `rowSums(L*F)`, where `F` is your distributed lag smooth and `L` is the weighting matrix. I spent a lot of time on this for a few recent projects, and finally realised that I needed to supply group-level distributed lag terms *for each group* in the formula (this is reasonably well-described here: https://github.com/nicholasjclark/portal_VAR). In short, you can create weight matrices for each level of the grouping factor for setting up group-level distributed lag terms: ``` weights_l1 <- weights_l2 <- matrix(1, ncol = ncol(plant_data$lag), nrow = nrow(plant_data$lag)) ``` For each level in the grouping factor, the rows in its weighting matrix need to have `1`s when the corresponding observation in the data matches that series, and `0`s otherwise ``` weights_l1[!(plant_data$subgroups == levels(plant_data$subgroups)[1], ] <- 0 plant_data$weights_l1 <- weights_l1 weights_l2[!(plant_data$subgroups == levels(plant_data$subgroups)[2], ] <- 0 plant_data$weights_l2 <- weights_l2 ``` Now you are ready to fit a model with different distributed lag terms per level of the grouping factor ``` climate_model <- gam(plant_growth ~ te(tmean, lag, by = weights_l1) + te(tmean, lag, by = weights_l2) + te(prec, lag, by = weights_l1) + te(prec, lag, by = weights_l2), data = plant_data) ```
|php|symfony|validation|multiple-choice|
null
I am running a Scala application that tries to perform Object Recognition using Spark. I state that I am new to both Spark and Object Recognition, so it's probable that I may encounter issues due to suboptimal programming. Whenever I try to run my application I get numerous instances of the following error: ``` 24/03/10 11:17:08 WARN TaskSetManager: Lost task 13.1 in stage 0.0 (TID 81) (slave-1 executor 10): ExecutorLostFailure (executor 10 exited caused by one of the running tasks) Reason: Container from a bad node: container_1708797483663_0062_01_000014 on host: slave-1. Exit status: 137. Diagnostics: [2024-03-10 11:17:07.993]Container killed on request. Exit code is 137 [2024-03-10 11:17:07.996]Container exited with a non-zero exit code 137. [2024-03-10 11:17:07.997]Killed by external signal ``` I am running my application with the following configuration: ```bash # Spark parameters export driver_memory=16g export num_executors=8 export executor_cores=7 export executor_memory=20g export default_parallelism=80 # Jar file, input path, output path export target="target/ObjectRecognition-1.0-SNAPSHOT-jar-with-dependencies.jar" export input_path="[...]" export output_path="[...]" spark-submit --class package.ObjectRecognition \ --master yarn --deploy-mode client --driver-memory $driver_memory \ --num-executors $num_executors --executor-memory $executor_memory --executor-cores $executor_cores \ --conf spark.default.parallelism=$default_parallelism $target $input_path $output_path ``` **Some technical details:** I am trying to run the application on a cluster that has 8 slaves and 1 master node. Each slave has around 25g of memory. The input dataset is the coco-dataset-2017, which means that each file only occupies around 100~200kb. I am using the yolov3 model to perform Object Recognition: I read the weights and the conf file and pass their content via broadcast variables. Each time a node is requested to perform detection it reads the network using `org.opencv.dnn.Net.readFromDarknet()`. (I am uncertain if this last detail is useful, but I acknowledge that approach might be not optimal, still I can't figure out any alternative). As far as I understand from searching on internet the error 137 is caused by Out Of Memory. I tried to "play" with the values for executor_memory and driver_memory in the bash script that runs my application but nothing changed.
Having a problem in datatables and fullcalendar scripts
|jquery|ajax|datatable|fullcalendar|
|typescript|google-chrome|axios|node-fetch|
I am using ROS Melodic and a Scout model with a Velodyne VLP-16 mounted on it. I am also using lidar odometry. However, when I display the robot model on RViz, the robot does not move and remains stationary, but the odometry continues to rotate. What could be the cause of this error and how can it be resolved? Thank you. This is the code that I changed of scout_mini.urdf.xacro to mout velodyne on the top. ``` <?xml version="1.0"?> <robot name="scout_mini" xmlns:xacro="http://ros.org/wiki/xacro"> <xacro:arg name="robot_namespace" default="/" /> <xacro:arg name="urdf_extras" default="empty.urdf" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_1.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_2.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_3.xacro" /> <xacro:include filename="$(find scout_description)/urdf/scout_mini_wheel_4.xacro" /> <!-- Variables --> <xacro:property name="M_PI" value="3.14159"/> <!-- Vehicle Geometries --> <xacro:property name="base_x_size" value="0.514618" /> <xacro:property name="base_y_size" value="0.3816" /> <xacro:property name="base_z_size" value="0.10357" /> <xacro:property name="wheelbase" value="0.463951"/> <xacro:property name="track" value="0.416503"/> <xacro:property name="wheel_vertical_offset" value="-0.100998" /> <!-- <xacro:property name="track" value="0.3426" /> <xacro:property name="wheelbase" value="0.3181"/> <xacro:property name="wheel_vertical_offset" value="-0.160000047342231" />--> <xacro:property name="wheel_length" value="0.08" /> <xacro:property name="wheel_radius" value="0.08" /> <!-- Base link --> <link name="base_link"> <visual> <origin xyz="0 0 0.0" rpy="1.57 0 -1.57" /> <geometry> <mesh filename="package://scout_description/meshes/scout_mini_base_link2.dae" /> </geometry> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <!--<mesh filename="package://scout_description/meshes/scout_mini_base_link2.dae" />--> <box size="${base_x_size} ${base_y_size} ${base_z_size}"/> </geometry> </collision> </link> <!-- <joint name="chassis_link_joint" type="fixed"> <origin xyz="0 0 ${wheel_radius - wheel_vertical_offset}" rpy="0 0 0" /> <parent link="base_link" /> <child link="chassis_link" /> </joint> --> <link name="inertial_link"> <inertial> <mass value="60" /> <origin xyz="0.0 0.0 0.0" /> <inertia ixx="2.288641" ixy="0" ixz="0" iyy="5.103976" iyz="0" izz="3.431465" /> </inertial> </link> <joint name="inertial_joint" type="fixed"> <origin xyz="0 0 0" rpy="0 0 0" /> <parent link="base_link" /> <child link="inertial_link" /> </joint> <!-- For testing, hang the robot up in the air --> <!-- <link name="world" /> <joint name="world_to_base_link=" type="fixed"> <origin xyz="0 0 0.5" rpy="0 0 0" /> <parent link="world"/> <child link="base_link"/> </joint> --> <!-- Scout wheel macros --> <!-- wheel labeled from 0 to 3, conter-clockwise, starting from front right wheel --> <!-- motor 1 and 2 (left side) are mechanically installed in a reversed direction --> <xacro:scout_mini_wheel_1 wheel_prefix="front_left"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${wheelbase/2} ${track/2} ${wheel_vertical_offset}" rpy="-1.57 0 0" /> </xacro:scout_mini_wheel_1> <xacro:scout_mini_wheel_2 wheel_prefix="rear_left"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${-wheelbase/2} ${track/2} ${wheel_vertical_offset}" rpy="-1.57 0 0" /> </xacro:scout_mini_wheel_2> <xacro:scout_mini_wheel_3 wheel_prefix="front_right"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${wheelbase/2} ${-track/2} ${wheel_vertical_offset+0.001}" rpy="1.57 0 0" /> </xacro:scout_mini_wheel_3> <xacro:scout_mini_wheel_4 wheel_prefix="rear_right"> <!--<origin xyz="0 0 0" rpy="0 0 0" />--> <origin xyz="${-wheelbase/2} ${-track/2} ${wheel_vertical_offset+0.001}" rpy="1.57 0 0" /> </xacro:scout_mini_wheel_4> <!-- Additional definitions --> <xacro:include filename="$(arg urdf_extras)" /> <!-- Gazebo definitions --> <xacro:include filename="$(find scout_description)/urdf/scout_mini.gazebo" /> </robot> ```
I am working on a feature where I have an Github action that triggers on `issue_comment` events. But inside that i am using pre-commit.ci-lite which is suppose to run on `pull_request` events only(It is their internal implementation). So what i want is to trigger my workflow by `issue_comment` only, but before the runner takes pre-commit.ci-lite i want to trick the runner into believing that the event is `pull_request` and not `issue_comment`, just the github.event_name should be `pull_request` instead of `issue_comment` I am aware that i can use pre-commit.ci (non lite) for this. But I dont want to do that. May anyone help me with this?? I tried the following way, but it didn't worked ``` - name: Change Event name run: | github.event_name = pull_request ``` I know this is dumb
Is there a way to change Github Action event name in between?
|github|github-actions|devops|pre-commit|gitops|
null
I have quite an old IPhone available (first edition SE) that I want to use to make a provisioning profile together with a Mac computer. Will there be an issue using such an old IPhone for this purpose? Will the apps that I build with this profile only target an IPhone SE?
Any problem with creating provisioning profile with old Iphone?
|iphone|xcode|provisioning-profile|
Use html.unescape(): import html print(html.unescape('&pound;682m'))
Apple say "When the video zoom factor increases and crosses a camera’s switch-over zoom factor, this camera becomes eligible to set as the activePrimaryConstituentDevice." in this document: [https://developer.apple.com/documentation/avfoundation/avcaptureprimaryconstituentdevicerestrictedswitchingbehaviorconditions][1] So if you want your app can switch to ultra.wide camera when move iPhone close and switch to Angle Camera when fay away, you need set you device.videoZoomFactor = device.virtualDeviceSwitchOverVideoZoomFactors.first. guard let virtualDeviceSwitchOverVideoZoomFactor = input.device.virtualDeviceSwitchOverVideoZoomFactors.first as? CGFloat else { return } try? input.device.lockForConfiguration() input.device.videoZoomFactor = virtualDeviceSwitchOverVideoZoomFactor input.device.unlockForConfiguration() If you write like this, you can find you App can switch camera like iPhone Native Camera App.
I've found that I get this `invalid pkt-len found` error when I've added a new user to our git server (GOGS/Gitea), and they're using SSH URLs but they don't yet have permission to the repo they're requesting. ``` failed to checkout and determine revision: unable to clone 'ssh://git@git-ssh.mygiteahost.lan/username/my-git-repo': invalid pkt-len found ``` Once I've granted the user access to the repo it works as expected.
Spark application terminating with exit code 137
|scala|apache-spark|
null
|node.js|xtermjs|
I usually develop without HTTPS enabled, because then you don't have to worry about SSL issues. When you are done developing, that's when you can switch to HTTPS. For the development phase I use the following config in my Caddyfile: ```caddyfile http://localhost:8080 { reverse_proxy localhost:1337 } ``` If you want to use HTTPS anyways during development, you can use ```caddyfile localhost:8080 { tls internal reverse_proxy localhost:1337 } ``` `tls internal` will not work in a production environment so when you are deploying, you can use: ```caddyfile example.com { reverse_proxy localhost:1137 } ``` This will let Caddy manage the certificates by itself and you can be on your way :)
creating web app using dotnet 6 which should be using win auth. I have managed to run it locally on IIS Express by setting this [(screenshot of launchsettings.json)](https://i.stack.imgur.com/jaQCj.png) in the launchSettings.json I have followed this https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/authentication/windowsauthentication/ to enable windows authentication on the server IIS. Now, when I enter the web url its asking for credentials. [screenshot of login screen](https://i.stack.imgur.com/FfZU1.png) And here comes the issue. Its asking for email as username. But on the server where the IIS is running, my windows account does not have any email set up. Just username. I am using the username/password to connect via Remote Desktop. But here the credentials does not work. When I enter them, the login screen re-appear again, and again. Any idea where I have made mistake? I was trying to go over the setting of my windows account on the server, I have also tried it from different computer and still the same result.
|php|mysql|pdo|pivot|row|
null
Let say I've an std:array<int> such as: 0 1 1 1 0 1 1 0 I'd like to use std (if possible) to do this in c++-11: - sum adjacent 1's - erase the summed value - transform 0 to 1 So getting this result for the example above: 1 3 1 2 1 Thanks
How to merge/count adjacent 1's within an std:array using std?
|arrays|algorithm|c++11|std|