Critical dependency is preventing me from updating my app to latest framework version

My project relies on a specialized component which is stuck (by its configuration) to an older version of the framework my project is using. This makes updating to the latest version of the framework impossible.

What are the best practices when dealing with this type of issue?


Should I use entity framework for CRUD and let the database handle the complexity that comes with high end queries?

I am new to ef and liking it since it reduces the overhead of writing common queries by replacing it with simple add, remove functions. Agreed.

Today I got into the argument with my colleague who has been using it for a while and approached him for advice on when to use Stored Procedures and when to use EF and for what?

He replied;

Look, the simple thing is that you can use both but what’s the point of using an ORM if you are doing it all in database i.e. stored procedures. So, how would you figure out what to do where and why? A simple formula that I have learned that use ORM for all CRUD operation and queries that require 3-4 joins but anything beyond that you better use stored procedures.

I thought, analyzed and replied;

Well, this isn’t the case, I have seen blogs and examples where people are doing massive things with EF and didn’t need to write any procedure.

But he’s stubborn and calling it performance overhead which is yet beyond my understanding since I am relatively new as compared to him.

So, my question is that whether you only need to handle CRUD in ef or should do a lot more in EF as a replacement of stored procedures.

Error after gulp serve Sharepoint Framework

I downloaded a proj in github then i open it in VScode, run npm install, and then gulp serve, but it gives me this error

C:\Users\danielestodomingo\Desktop\react-list-form>gulp serve Build target: DEBUG C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:178 throw new Error(prefix + os.EOL + ^

Error: JSON validation failed: C:\Users\danielestodomingo\Desktop\react-list-form\config\tslint.json

Error: #/ (Defines configuration options for the…) Additional properties not allowed: lintConfig,useDefaultConfigAsBase,removeExistingRules,displayAsWarning at validateObjectWithCallback (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:178:19) at JsonSchema.validateObjectWithCallback (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:193:13) at JsonSchema.validateObject (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:175:14) at TslintCmdTask._readConfigFile (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\tasks\GulpTask.js:308:28) at TslintCmdTask.onRegister (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\tasks\GulpTask.js:87:32) at Object.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\index.js:299:24) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-common\lib\BuildRig.js:61:19) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-common\lib\SPBuildRig.js:22:15) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-web\lib\SPWebBuildRig.js:15:15) at Object.exports.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-web\lib\index.js:23:17) at Object. (C:\Users\danielestodomingo\Desktop\react-list-form\gulpfile.js:6:7) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

I have no idea what this is and what to do.. pls help

upload file slim framework different directory

i have problem when i will upload my file to defferent server in my localhost. in this code success, but i want the directory like this $ directory = ‘http://localhost/jurnal/dataJurnal/journals/2/articles/’;

$ app->post(‘/api/uploadArsip’, function(Request $ request, Response $ response) {

$  directory = 'C:\xampp\htdocs\jurnal\dataJurnal\journals\articles'; //mkdir("hallo\hai",0777,true); $  uploadedFiles = $  request->getUploadedFiles();  // handle single input with single file upload $  uploadedFile = $  uploadedFiles['fileArsip']; print_r($  uploadedFiles['fileArsip']); $  basename = pathinfo($  uploadedFile->getClientFilename(), PATHINFO_FILENAME); print_r($  uploadedFile);  if ($  uploadedFile->getError() === UPLOAD_ERR_OK) {     $  extension = pathinfo($  uploadedFile->getClientFilename(), PATHINFO_EXTENSION);      $  filename = sprintf('%s.%0.8s', $  basename, $  extension);      $  uploadedFile->moveTo($  directory . DIRECTORY_SEPARATOR . $  filename);     $  response->write('uploaded ' . $  filename . '<br/>'); }else{ $  response->write('gagal <br/>'); } 


MLT framework audio fade out because of shorter video

What I ask is automatically trimming the end of an audio file and fade out at the trimmed end.

There are short video clips which have a presentation style, like some maps and text instructions. These are typically produced from still images selected by my partner, and I get only an .mp4 file. As they have no audio, I wanted to automatically add some instrumental music as background, which is longer than almost all of the video clips. No graphics interface video editor is available anyway, only a Linux terminal.

The MLT framework seemed to be my way to go, but I am failing on trimming the music end and fade it out. One of my problems is that I cannot predict each video clip length.

One of my attempts included the sox.fade filter: melt music.mp3 -filter sox.fade:”h 5” -filter sox.fade:”h 0 00:45 5” -video-track V.mp4 out=1188 but it throws errors like “effect processing failed” with a horrible noise, or, using another command syntax, an error like “cannot fade out, audio length is neither known nor given”.

Another attempt for fade out tried to use two audio tracks, one of which is silence, and make a transition mix from music to silence. It only succeeded as fade in. melt V.mp4 in=0 out=1188 -attach-track volume:0 end=-70db in=1000 out=1188 -audio-track music.mp3 out=1188 -transition mix in=800 out=1188.

What could I do to find the correct way of trimming and fading out a longer audio track than the video, and how could I automate the process?

Retornar o menor valor usando o Entity Framework

Sou bastante inexperiente é verdade, mas criei coragem e vim aqui perguntar.. Estou preso há algumas horas em uma solução que aparentemente teria tudo pra ser simples, mas não consigo enxergar uma saída.

Eu tenho dois models, em um deles eu tenho a informação básica do produto (descrição, foto, etc) e no outro eu tenho informações específicas daquela embalagem, como quantidade na embalagem e preço.

Por exemplo:

Produto : Coca Cola 2 lts


UN:1 – 6,99

CX:12 – 83,88

Eu preciso fazer uma pesquisa que me retorne o menor preço das embalagens cadastradas por produto.

O SQL seria esse:


Normalmente eu poderia usar uma expressão do tipo

contexto.ProdutoEmbalagens.Min(c => c.Preco) 

No entanto, eu estou tentando trazer informações do produto também:

var produtos =                     (from prod in contexto.Produtos                      join emb in contexto.ProdutoEmbalagems on prod.Id equals emb.IdProduto                      where prod.IdEstabelecimento == idEstabelecimento                      select new                      {                          prod.Id,                          prod.Descricao,                          emb.Embalagem,                          emb.Quantidade,                          emb.Preco                      }).ToList(); 

Alguma ideia? Sei que certamente a solução é simples, mas já fritei a cabeça 🙁

zend framework não aceita charset iso8859-1

Estou desenvolvendo com zend framework 3 e criei um skeleton application, por padrão o skeleton vem com charset UTF-8. embora eu tenha alterado no layout.phtml a tag de <meta charset="UTF-8" /> para <meta charset="ISO-8859-1" /> o sistema continua enviando headers como UTF-8. Como solução trivial forcei o layout.phtml a enviar a header ISO 88-59-1

 <?php header('Content-type: text/html; charset= iso-8859-1 ');?> 

Porem comecei a ter problemas no banco de dados pois embora o charset da tabela fosse ISO-8859-1, estava salvando como UTF-8.

Acredito que esta forma forçada de mudar o charset não seja a correta no zf e por isso estou com este problema. Alguma sugestão?

Как открыть модальное окно ShowDialog() в FrameWork 4.0? Исключение in PresentationCore.dll

Подскажите пожалуйста, разрабатываю приложение WPF под FrameWork 4.0, т.к. необходима совместимость с win XP. При определённом условии, мне необходимо вызвать модальное окно, но при всём богатстве описания данной процедуры – я терплю неудачу… получаю исключение: Exception thrown: 'System.InvalidOperationException' in PresentationCore.dll на вот этой строке : Window_Dialog winDialog = new Window_Dialog();

Ошибка вроде бы не новая, решения её есть, вызов во втором потоке, но скорее всего сказывается скудный опыт, ибо решить не получается.

void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)     {         timer.Stop();         Order result = orders.Find(x => x.Id == TempOrder.Id);          if(result.CustomerName == "")         {             Window_Dialog winDialog = new Window_Dialog();              if (winDialog.ShowDialog() == true)             {                 MessageBox.Show("Записано!");             }             else             {                 MessageBox.Show("Отмена");             }          } } 

Буду рад Вашему совету! Спасибо!